Importing Translations
Already have translated files you want to bring into Stringhive? Maybe from a previous TMS, from a translation agency, or from your own app's lang directory. Upload them and Stringhive will match them to your source strings.
Supported formats
| Format | Extension(s) | Notes |
|---|---|---|
| JSON | .json |
Flat or nested key-value objects |
| PHP | .php |
Laravel-style arrays returning a flat or nested array |
| YAML | .yaml, .yml |
Flat or nested mappings |
| PO / Gettext | .po |
msgid used as key, msgstr as value |
| XLIFF | .xliff, .xlf |
XLIFF 1.2 and 2.0; id attribute used as key, <target> as value |
| CSV | .csv |
First column is the key, second column is the value |
| iOS .strings | .strings |
Apple "key" = "value"; format |
| Android XML | .xml |
Android <string name="key">value</string> format |
| ZIP | .zip |
A zip containing any mix of the above formats |
How to import
In your Hive view, click Import and select Translations. Choose the target locale, upload your file, pick an overwrite strategy, and click Preview.
The preview breaks down:
- New: translations that don't exist yet in Stringhive
- Existing: translations that already exist (will be skipped or overwritten depending on your strategy)
- Unknown: keys in your file that don't match any source string
Unknown keys are ignored. If you have a lot of them, it might mean your file is from a different Hive or an older version of the source strings.
Overwrite strategy
Skip (default). If a translation already exists for a string, it's left alone. Only missing translations are filled in.
Overwrite. Existing translations are replaced with the values from the file. Use this when you have a fresh translation from an agency and want to replace what's there.
Custom locale codes
If your translation files use a non-standard locale code in the filename (like zh-tw.json instead of zh-Hant), set a custom code in your Hive's locale settings first. Stringhive will recognize the custom code and map it to the right locale.
Via the API
See API: Translations for programmatic imports.