-
Notifications
You must be signed in to change notification settings - Fork 6
Internationalization
Fran Bolívar edited this page May 17, 2019
·
2 revisions
We use the i18n management of Qt. It is quite simple. In the source code, we use a string for example 'LINE_SELCTION' and we define an XML file with .ts extension for each locale.
For each translation we have to type in the corresponding place of the XML (separated by UI class) the code below:
<message>
<source>LINE_SELECTION</source>
<translation>Line selection</translation>
</message>
where the source is the string used in the source code and the translation the string in the language of the locale.
When you edit or create a new .ts file you have to generate the correspondent .qm file by typing:
lrelease xx_XX.ts