Loading...
{
"button1": "Pay now",
"text2": "Order summary"
}{
"checkout": {
"payButton": "Pay now",
"summaryTitle": "Order summary"
}
}Namespaced, descriptive keys show translators where text appears and make unused keys easy to find.
Text-as-key is readable, but editing the English changes the key and orphans every translation. Semantic keys stay stable.
Both work. Nested keys group by feature, flat dotted keys are easy to search; pick one style and keep it.
Use a tool that extracts keys from code and compares them with translation files. Avoid building keys at runtime like t('status.' + s).