Use semantic keys
Use books.empty rather than sentence_17. A semantic key survives copy edits and tells a translator where the message belongs.
{
"i18n": {
"enabled": true,
"directory": "src/locales",
"default": "en",
"fallback": "en",
"supported": ["en", "fr"],
"detection": ["route", "cookie", "header"]
}
}Variables and plurals
Placeholders safely insert names. Plural catalogs use one and other so count controls the grammatical form.
Check catalog quality
i18n:check compares catalogs, i18n:missing fr lists missing keys, and malformed JSON fails visibly.