Yes, this is the exact opposite question than: Why do people use plain english as translation placeholders?
I used the standard gettext way for translation all the time but now that I'm doing frontend I realized that not only most libraries are using keys/placeholders but this is sometimes recommended (see i18next) over using plain English.
I haven't work much with placeholders but I find it difficult because:
- you have to invent unique placeholder names all the time, you need conventions
- maybe you want to reuse the same placeholder name so you have to find an existing one that matches what you are translating
- is it better to have all translations scoped per module or to have shared translations? I'm not sure
According to the doc of i18-next, it is recommended to use placeholders because:
While this works and might reduce files to load it makes the management of translations a lot harder as you will need to update changes to fallback values in code and json files.
- I wouldn't use plain English to reduce the number of files to be loaded. This seems obviously wrong.
- JSON? What's wrong with PO/POT? There are so many tools for translators already.
- If a wording needs to be changed, all translations should be reviewed, so I guess it's kinda "good" that it would break the old translations, right?
- It seems easier to me that devs can focus on getting the English text right and translators getting the other languages right.
- I really don't see how it's a lot harder to use plain English. A real life example would be great.
My guess is that there are pros and cons to both methods but I don't see the pros with placeholders so I would like to understand.