YAML Import / Export for Mobile
Using the YAML file format to import/export content
Within the Localize dashboard we provide you with an ability to import and export phrases and translations in various file formats.
You can also import/export Glossary terms.
Importing / Exporting
To see a general explanation of how importing and exporting works in Localize, click here. Be sure to adhere to the file requirements below so that Localize will be able to successfully read your files.
Import First!
YAML files for the source language must first be imported into the Localize dashboard so that the
phraseKeys
are established. Then upon subsequent exports, thephraseKeys
will be maintained.Exporting phrases for which there is no
phraseKey
will result in an unusable YAML file!!!
File Requirements
UTF-8 Character Encoding
Be sure that you are using the UTF-8 character encoding when working with the external files you are creating for importing purposes, so that special characters like accents are encoded properly.
For YAML files, the import/export tools assume one language per file.
- YAML is one of the file formats that Localize supports with
key: value
pairs for phrases. - Exporting a YAML file will preserve the
key: value
structure which was previously imported. - Keys can also be nested.
- The phrase key will be visible within the phrases listing, and in the information panel for a phrase.
Use the following sample for guidance when creating your YAML files for importing into Localize.
The following data is required:
[language code]
: the language code for the filekey: value pairs
:- the key specifies the "name" of the phrase
- the value specifies the content of the phrase
en:
welcome: Hello
signup: Sign up
contact:
email: Email address
phone: 555-123-4567
The equivalent Spanish file:
es:
welcome: Hola
signup: Regístrate
contact:
email: Dirección de correo electrónico
phone: 555-123-4567
Troubleshooting
If your import fails an error message will be displayed. Later, you can also view the error here under Import History.
Updated about 3 years ago