Prompt
What should I use for translating short strings in a product UI?
Latest observation
Nov 2, 2026
OpenAI APIWeb search: off
For short UI strings (labels, buttons, tooltips, errors), the best choice is usually:
Use a proper i18n/translation system with message keys
Examples:
- FormatJS / react-intl
- i18next
- Lingui
- Vue I18n
- Angular i18n
Why this is best
- Keeps text out of code
- Supports pluralization, gender, date/number formatting
- Easier to send to translators
- Works well with short, reusable strings
Typical pattern
Instead of:
<button>Save</button>
Use:
<button>{t('button.save')}</button>
And in translation files:
{
"button.save": "Save"
}
If you mean “what should the source strings be?”
For UI text, keep strings:
- short
- clear
- contextual
- not concatenated
Good:
- “Save changes”
- “Delete account”
- “Retry”
Avoid:
- “Save”
- “Delete”
- “Retry now please”
when context matters, unless the UI makes it obvious.
If you’re choosing a format
For short UI strings, use:
- message keys + translation files (
.json,.po,.arb, etc.) - ideally with a library that supports ICU message syntax
If you want, I can recommend the best option for your stack (React, Vue, mobile, backend, etc.).