# QT TS

> Localization format for Qt framework

URL: https://store.crowdin.com/qtts
Identifier: qtts
Category: File Formats
Type: System
Author: Crowdin

QT TS is a natively supported file format, you can use it without an additional installation. Just upload it to your projects and start the localization.

## File Format Details

| Attribute | Value |
| --------- | ----- |
| File Extension | .ts |
| [API Type](https://developer.crowdin.com/api/v2/#operation/api.projects.files.post) | qtts |
| Source can be edited in Crowdin | No |
| Generating translated files via [Bundles](https://support.crowdin.com/bundles/) | [Search Crowdin Store](https://store.crowdin.com/tags/string-exporter) |
| Supports pluralization | Yes |
| WYSIWYG Preview in the editor | No |
| Supported types of contextual information | Text comments, Screenshots |
| Custom attributes | No |
| Existing translations import possibility | Key-value mapping |

## Sample File

```xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en" sourcelanguage="en">
<context>
  <name>Page</name>
  <message>
    <source>Text for translation</source>
    <comment>commenting</comment>
    <translation type="obsolete">translated string</translation>
  </message>
  <message>
     <source>Text for translation #2</source>
     <extracomment>some text</extracomment>
    <translation>some translation</translation>
  </message>
</context>
<context>
  <name>installscript</name>
  <message>
    <source>Text for translation #3</source>
    <oldcomment>some new comments here</oldcomment>
    <translation>some new translation here</translation>
  </message>
</context>
<context>
    <name>apple_count</name>
    <message numerus="yes">
      <source>%s apple(s)</source>
      <translation>
        <numerusform>%s Apfel</numerusform>
        <numerusform>%s Äpfel</numerusform>
      </translation>
    </message>
  </context>
</TS>
```

## Translating QT TS


**Attributes**



Import as a hidden string:



```

<message>

  <source>String for translation</source>

  <translation type="obsolete">translated string</translation>

</message>

```



```

<message>

  <source>String for translation</source>

  <translation type="unfinished">translated string</translation>

</message>

```



**Plurals**



```

<context>

    <name>apple_count</name>

    <message numerus="yes">

      <source>%s apple(s)</source>

      <translation>

        <numerusform>%s Apfel</numerusform>

        <numerusform>%s Äpfel</numerusform>

      </translation>

    </message>

  </context>

```



**Custom Attributes**



Source text will be taken from the `<translation>` node:



```

<TS x-crowdin-source-element="translation">

```





**Comments**



Comment to the string can be indicated by the following: `<comment>`, `<extracomment>`, `<oldcomment>`



```

<message>

  <source>Text for translation</source>

  <comment>commenting</comment>

  <translation>translation</translation>

</message>

```
