Translate Qt Linguist .ts files

What are .ts files?

Qt Linguist .ts files are language files used to localize cross-platform Qt applications. The file extension is .ts.

WebTranslateIt can help localize Qt .ts files.

.ts file example

<!DOCTYPE TS><TS version="2.1" sourcelanguage="en" language="sv">
<context>
    <name>kernel/navigationpart</name>
    <message>
        <source>Newsletter</source>
        <translation>Nyhetsbrev</translation>
    </message>
    <message>
        <source>vztnewsletter</source>
        <comment>Navigation part</comment>
        <translation>vztnewsletter</translation>
    </message>
    <message numerus="yes">
        <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
        <translation>
            <numerusform>%1 prend au maximum %n argument. %2 est donc invalide.</numerusform>
            <numerusform>%1 prend au maximum %n arguments. %2 est donc invalide.</numerusform>
        </translation>
    </message>
</context>
<context>
    <name></name>
    <message>
        <source>%1 e-mail(s) bounced back</source>
        <translation>%1 e-post adresser er ugyldige</translation>
    </message>
    <message>
        <source>Links clicked</source>
        <translation>Linker klikket</translation>
    </message>
    <message>
        <source>This link is clicked</source>
        <translation>Denne lenken er klikket</translation>
    </message>
    <message>
        <source>times</source>
        <translation>ganger</translation>
    </message>
</context></TS>

Magic Comments

This file handler support the following magic comments:

  • Comments containing [MAXCHAR=xx] will set a max character limit to xx. Example: <comment>[MAXCHAR=20]</comment>
  • Comments containing [LABEL=xxxx] will assign the label to xxxx. Example: <comment>[LABEL=new feature]</comment>

More Information

Related Platforms

Qt