Angular XTB
- Extension
- .xtb
- Import
- yes
- Export
- yes
The XTB format is a format for storing localized data, unlike the XMB format, which is used to to generate and translate the original translation.
The XTB format is an xml file with a list of key-value pairs without any deeper structure.
Translations are placed inside the <translationbundle> tag
in which the id attribute describes the term name and the content describes the translation.
Important
Angular's XMB translation generation generates xmb source language files, but uses xtb translation files (XML Translation Bundle: XTB).
Documentation
Official Angular i18n documentation
More about the XMB format
Example
Download the example file<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE translationbundle [ <!ELEMENT translationbundle (translation)*> <!ATTLIST translationbundle lang CDATA #REQUIRED> <!ELEMENT translation (#PCDATA|ph)*> <!ATTLIST translation id CDATA #REQUIRED> <!ATTLIST translation desc CDATA #IMPLIED> <!ATTLIST translation meaning CDATA #IMPLIED> <!ATTLIST translation xml:space (default|preserve) "default"> <!ELEMENT ph (#PCDATA|ex)*> <!ATTLIST ph name CDATA #REQUIRED> <!ELEMENT ex (#PCDATA)> ]> <translationbundle lang="en"> <translation id="addTerm" xml:space="default">Add translation</translation> <translation id="cancel" xml:space="default">Cancel</translation> <translation id="confirm" xml:space="default">Confirm</translation> <translation id="enterProjectName" xml:space="default">Enter project name</translation> <translation id="helloWorld" xml:space="default">Hello World</translation> <translation id="hi" xml:space="default">Hello</translation> <translation id="selectLanguage" xml:space="default">Choose language</translation> <translation id="settings" xml:space="default">Settings</translation> </translationbundle>