About Translate JSON and PO Files
Translate JSON, YAML and PO files when your app or website needs another language. Locale files for i18next, vue-i18n, Rails or gettext are full of keys your code depends on. Every key and the structure of the file stay exactly as they are, and only the text values are translated, so the new file sits right next to your existing locales. Your README and docs can follow with Translate TXT, Markdown and HTML, which protects code and links.
Placeholders such as {name}, {{count}} or %s, URLs and values that look like codes, colors or file names are left alone. Set the target language under Translate to; the source language is detected, or you can name it under More options. Short interface strings like Save, Open or Close depend on context, so test the new language in the app itself before you ship.
How to use Translate JSON and PO Files
- 1Upload the language file
Choose a .json, .yaml, .yml, .po or .pot file, or drop it on the page.
- 2Choose the new locale
Set Translate to, and open More options if you want to name the source language.
- 3Run the translation
Press Translate JSON and PO Files. Keys are kept and only the values change.
- 4Add it to your project
Save the file in your locale folder and test the app in the new language.
Why use Cubfile for this
- Every key preserved
Keys and nesting stay as they are, so your code still finds every string.
- JSON, YAML and PO
Locale files from JavaScript frameworks, Rails and gettext projects are all accepted.
- Placeholders protected
{name}, {{count}}, %s and similar placeholders come back exactly where they were.
- Your code stays home
Only the language file is uploaded, and it's deleted automatically one hour later.