Qt Localization
Qt Linguist is a tool provided by Qt to support the i18n process for Qt based applications. Qt TS is the resource file format to externalize your translations.
Format
the file format is based on XML
the attribute “language” of the <TS> node has to be given and must specify the target locale used in this file using ISO 639-1 (it is allowed to use “_” as region separator, eg. “en_US”)
the “language” attribute will be used by LingoHub to determine the language of the translations in the file
if there is a locale in the filename, this information won’t be used
every message element will result in a segment in LingoHub
the <source> attribute will be used as translation title
if <message> is grouped inside <context>, the <name> element value will prefix the translation title. So a <source> value has to be unique in its context.
the <translation> element holds the content of the segment and is understood as translation for the language specified by the “language” attribute in the root node
the content of <comment> attributes will be imported as description for the translation
<location> elements will be stored by LingoHub and exported as imported
placeholders are specified by “%” followed by a number, eg.: “%1”
Example
Additional example files can be accessed here.
References
Last updated