Hi,
I have questions regarding the i18n syntax, especially how data should be formatted in JSON. It is not very clear in the official documentation, as the only example is in TOML :
[home]
other = "Home"
Since then, I worked with JSON and was able to make it work like this :
# site/i18n/en.json
{
"id": "hello",
"translation": "Hello"
}
It is working fine. But now, I need to work with POEditor. POEditor is an interface for managing translated contents with key - values syntax. The export function of POEditor has two ways of rendering JSON :
# 1. Classic export
{
"term": "hello",
"definition": "Hello",
"context": " ",
"term_plural": " ",
"reference": " ",
"comment": " "
}
# 2. Key - Value export
{
"hello": "Hello",
}
The problem is both of these exports are not working natively with Hugo i18n files.
My questions are :
- are
id
andtranslation
keys mandatory in Hugo i18n files ? - if not, which syntax can be used for i18n files, at least for make it work with POEditor ?
Thank you for your answers !