<a id="qtling"></a>

# Qt Linguist .ts

<a id="index-0"></a>

Translation format used in Qt based applications.

Qt Linguist files are used as both bilingual and monolingual translations.
Weblate supports both the current version 2 format and the legacy version 1
format. Select the file format matching the version produced by your
application.

#### SEE ALSO
* [Qt Linguist manual](https://doc.qt.io/qt-6/qtlinguist-index.html)
* [Qt .ts](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/ts.html)
* [Dvojezični i jednojezični formati](https://docs.weblate.org/hr/latest/formats.md#bimono)

## Version 2

This is the default format for `.ts` files and supports the full set of Qt
Linguist features available in Weblate.

Example file:

```xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="cs">
<defaultcodec>UTF-8</defaultcodec>
<context>
    <name></name>
    <message weblate-flags="c-format, max-length:100">
        <source>Hello, world!
</source>
        <translation>Ahoj svete!
</translation>
    </message>
    <message numerus="yes">
        <source>Orangutan has %d banana(s).
</source>
        <translation type="unfinished">
            <numerusform />
            <numerusform />
            <numerusform />
        </translation>
    </message>
</context>
<context>
    <name>Second</name>
    <message>
        <source>Try Weblate at &lt;https://demo.weblate.org/&gt;!</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <source>Thank you for using Weblate.</source>
        <translation type="unfinished">Thanks</translation>
    </message>
    <message>
        <source>Obsolete</source>
        <translation type="obsolete">Thanks</translation>
    </message>
</context>
</TS>
```

<!-- AUTOGENERATED START: format-features ts -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### Podržane funkcije

| Datotečni sufiks                                                                                           | `.ts`                     |
|------------------------------------------------------------------------------------------------------------|---------------------------|
| Jezičnost [ⓘ](https://docs.weblate.org/hr/latest/formats.md#bimono)                                          | Jednojezične i dvojezične |
| Podržava množinu [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-plurals)                           | `Yes`                     |
| Podržava opise [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-description)                         | `Yes`                     |
| Podržava objašnjenja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-explanation)                   | `No`                      |
| Podržava kontekst [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-context)                          | `Yes`                     |
| Podržava mjesto [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-location)                           | `Yes`                     |
| Podržava oznake [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-flags)                              | `Yes`                     |
| Dodatna stanja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-states)                              | `Needs editing`           |
| Identifikator API-ja                                                                                       | `ts`                      |
| Podržava izraze koji su samo-za-čitanje [ⓘ](https://docs.weblate.org/hr/latest/formats.md#read-only-strings) | `No`                      |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/hr/latest/formats.md#obsolete-strings)       | `No`                      |
<!-- AUTOGENERATED END: format-features ts -->

## Version 1

The legacy format supports messages, contexts and the unfinished state. It
does not support plurals, locations, descriptions or Weblate flags.

<!-- AUTOGENERATED START: format-features ts1 -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### Podržane funkcije

| Datotečni sufiks                                                                                           | `.ts`                     |
|------------------------------------------------------------------------------------------------------------|---------------------------|
| Jezičnost [ⓘ](https://docs.weblate.org/hr/latest/formats.md#bimono)                                          | Jednojezične i dvojezične |
| Podržava množinu [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-plurals)                           | `No`                      |
| Podržava opise [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-description)                         | `No`                      |
| Podržava objašnjenja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-explanation)                   | `No`                      |
| Podržava kontekst [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-context)                          | `Yes`                     |
| Podržava mjesto [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-location)                           | `No`                      |
| Podržava oznake [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-flags)                              | `No`                      |
| Dodatna stanja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-states)                              | `Needs editing`           |
| Identifikator API-ja                                                                                       | `ts1`                     |
| Podržava izraze koji su samo-za-čitanje [ⓘ](https://docs.weblate.org/hr/latest/formats.md#read-only-strings) | `No`                      |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/hr/latest/formats.md#obsolete-strings)       | `No`                      |
<!-- AUTOGENERATED END: format-features ts1 -->

## Weblate konfiguracija

|                                       | Typical Weblate [Konfiguracija komponente](https://docs.weblate.org/hr/latest/admin/projects.md#component) when using as bilingual   |
|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| Maska datoteke                        | `i18n/app.*.ts`                                                                                                             |
| Jednojezična datoteka osnovnog jezika | Empty                                                                                                                       |
| Predložak za nove prijevode           | `i18n/app.de.ts`                                                                                                            |
| Format datoteke                       | Qt Linguist translation file<br/>(version 2)                                                                                |

|                                       | Typical Weblate [Konfiguracija komponente](https://docs.weblate.org/hr/latest/admin/projects.md#component) when using as monolingual   |
|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| Maska datoteke                        | `i18n/app.*.ts`                                                                                                               |
| Jednojezična datoteka osnovnog jezika | `i18n/app.en.ts`                                                                                                              |
| Predložak za nove prijevode           | `i18n/app.en.ts`                                                                                                              |
| Format datoteke                       | Qt Linguist translation file<br/>(version 2)                                                                                  |

For version 1 files, use the same configuration and select
Qt Linguist translation file (version 1) as the file format.
