Supported File Types (Strings)

.TS - Qt Translation Source (Strings)

Content is machine translated from English by Phrase Language AI.

File Extensions 

.ts

API Extension 

ts

Import 

Yes

Export 

Yes

Plural forms support 

No

Description support 

Yes

An XML-based standard localization file format for QT applications. Translations are typically placed in the <translation> tag. Each <translation> tag may have different type properties including unfinished, vanished, obsolete, etc.  Ensure type=’unfinished’ is added to tags where strings are to be translated.

Code Sample

<?xml version="1.0" encoding="UTF-8"?>
<TS version="2.0" language="en-GB">
  <context>
    <message>
      <source>boolean_key</source>
      <translation>--- true
</translation>
    </message>
    <message>
      <source>empty_string_translation</source>
      <translation/>
    </message>
    <message>
      <source>key_with_description</source>
      <translation>This key has a description! (At least in some formats)</translation>
    </message>
    <message>
      <source>key_with_line-break</source>
      <translation>This translations contains
a line-break.</translation>
    </message>
    <message>
      <source>nested.deeply.key</source>
      <translation>I'm a deeply nested key.</translation>
    </message>
    <message>
      <source>nested.key</source>
      <translation>See, this key is nested inside a namespace.</translation>
    </message>
    <message>
      <source>null_translation</source>
      <translation/>
    </message>
    <message numerus="yes">
      <source>pluralized_key</source>
      <translation>
        <numerusform>Only one pluralization found.</numerusform>
        <numerusform>Hey, you have %s pluralizations!</numerusform>
        <numerusform>You have no pluralization.</numerusform>
      </translation>
    </message>
    <message>
      <source>sample_collection</source>
      <translation>---
- first item
- second item
- third item
</translation>
    </message>
    <message>
      <source>simple_key</source>
      <translation>Simple key, simple message, so simple.</translation>
    </message>
    <message>
      <source>unverified_key</source>
      <translation>This translation is not yet verified and waits for it. (In some formats we also export this status)</translation>
    </message>
  </context>
</TS>
Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.