Applanga App Localization Logo
  • Product
    Overview How it works Features Integrations
  • Resources
    Blog Whats New About Us Solutions Documentation FAQ
  • Pricing
  • Contact
  • See a Demo
  • Login
  • Try for free
  • DocumentationDocs
  • Supported File FormatsSupported Formats
  • TS File

TS File

Qt uses ts files for automatic translations​.

Richard 
Written by Richard
Updated over a week ago

Qt ts files are xml files which are used by the Qt Linguist application. They also get used to provide automatic translations for Qt Applications.

This format behaves a little different than most other formats in order to make it compatible with Applanga.

  1. Id's

    When importing an Ts file Id's will be automatically generated. This follows the following Pattern contextName$@SourceHash{$@CommentHash}[pluralisationType]

    Note:

    1.1 CommentHash is only present if there are 2 or more messages in the same context with the same source field attribute.

    1.2 pluralistaionType is only given for plural messages.

    1.3 $@ is the delimiter for the id's do not use them lightly with this format

    1.4 If you change the Source/Comment message in your application and import that ts file again, you will end up with legacy id's since the Hash has changed. So you should try to avoid this.

  2. Pluralisation

    All pluralisation types that Applanga supports are supported with the Qt Ts export, but they might not be contained in your export file, since Qt has special pluralisation styles for many languages

    Example:

    For arabic (ar) export, all pluralisations would be present in the exported file [zero,one,two,few,many,other].

    For japanese (ja) export, only one pluralisation type would be present [other].

    Qt uses 17 of those pluralisation styles. Most of them are documented here.

  3. Meta attributes

    After you imported a Ts file, your Project will have meta attributes called ApplangaIDContext and ApplangaIDSource.

    Both attributes should not be edited manually !

You can either import and export your .ts files manually on the dashboard or you can automate your TS file translation process with the Applanga Localization CLI.

File Extension
.ts
CLI format key
qt_ts
CLI Supported
true
SDK Supported
false
String Description Supported
true
Pluralization Supported
true

Example:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de">
<context>
    <name>UiContext</name>
    <message>
        <source>Name</source>
        <comment>An example entry for Name</comment>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <source>This is just a Sample</source>
        <translation>Dies ist nur ein Beispiel</translation>
    </message>
</context>
<context>
    <name>CodeContext</name>
    <message>
        <source>I am a message in which was written in Code</source>
        <translation type="unfinished"></translation>
    </message>
</context>
</TS>
Product Details
  • Overview
  • How it works
  • Features
  • Integrations
  • Demo
  • Pricing
  • App Localization
  • Android Localization
  • iOS Localization
  • Unity Localization
Information Hub
  • Blog
  • Whats New?
  • How-to?
  • Documentation
  • iOS Integration
  • Android Integration
  • Unity Integration
  • React Native
  • Flutter
  • Rest API
  • Supported File Formats
  • Command Line Interface
  • Solutions
  • FAQ
Company
  • Home
  • About Us
  • Contact
  • Jobs
  • Terms of Service
  • Privacy Policy
  • Imprint
From our Blog
  • • How to Add Screenshots from Design Files to App Strings
  • • How to use a custom SSO Provider (PingIdentity SSO)
  • • Applanga Webinar - Android SDK
  • • How to Use Applanga for Multi-Platform Localization
  • • Preparing for Localization
  • • 6 Ways to Clean Up Applanga Projects
  • • Applanga Webinar - Translation Review
  • • Q4 2021 Release Notes
  • • Design Tool Plugin Best Practices
Stay up to date
Undecided or News Hungry?
Subscribe to our newsletter to get
the latest updates on Applanga's development!
Subscribe

©  All rights reserved. Mbaas Development GmbH.

Thank you!

We have received your request and will get back to you asap!

Contact Us

Email successfully sent

Marketing Permissions

Mbaas Development GmbH will use the information you provide on this form to be in touch with you and to provide updates and marketing. Please let us know all the ways you would like to hear from us:

Email

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at privacy@applanga.com. We will treat your information with respect. For more information about our privacy practices please visit our website. By clicking below, you agree that we may process your information in accordance with these terms.