Angular
@angular/localize (XLIFF-Files)
BabelEdit supports Angular's native translation method using @angular/localize.
A complete tutorial is available from here:
XLIFF 1.2 / 2.0
BabelEdit is not a generic XLIFF editor. It supports only portions of the file format which is also used by the frameworks.
For @angular/localize, we support XLIFF 1.2 - which is the default for Angular's extraction tool. The subset BabelEdit supports works with all steps in the translation workflow: Extraction, editing, importing.
ngx-translate (JSON files)
Complete tutorials including a small demo project are available here:
The preferred layout for the ngx-translate project is to keep the translation files in your assets/i18n folder and name the json files with the translations according to the language code:
- assets‚
- i18n
- de.json
- en.json
- fr.json
- i18n
You are of course free to give your files other names or store them elsewhere. Just make sure to configure ngx-translate according to your file layout.
ngx-translate supports all 3 JSON formats supported by BabelEdit:
- JSON with nested namespaces (Namespaced JSON)
- JSON with namespaces in key (Flat JSON)
- JSON with plaintext keys
If you use ngx-translate-extract (recommended!) to extract your translations and update your translation files make sure that the format you chose matches the file format set in BabelEdit's settings.
Transloco (JSON files)
Please read this tutorial for details: