Skip to main content
This tutorial uses Qt Linguist TS files as the localization boundary for a Qt or QML application. lupdate stays responsible for extracting tr() and qsTr() calls. Hyperlocalise translates the resulting .ts catalogs. Native Platform uploads treat .ts as Qt Linguist. TypeScript locale modules that also use .ts stay on the CLI JavaScript and TypeScript workflow.

Prerequisites

You need:
  • a Qt or QML project that produces .ts catalogs with lupdate;
  • the Hyperlocalise CLI;
  • a Platform project with en-US as source and fr-FR and de-DE as targets; and
  • HYPERLOCALISE_API_KEY and HYPERLOCALISE_PROJECT_ID in your environment.
The example uses one catalog per locale:

1. Extract a source catalog

Keep tr() and qsTr() calls in application code. Use QT_TRID_NOOP when a message needs a stable id.
Run lupdate to write the source catalog:
A source message looks like:
Keep empty <translation> elements in the source file. Hyperlocalise preserves <source> and writes the translated value into <translation>.
Messages that share the same source text in different contexts or with different <comment> values become separate keys. Obsolete and vanished translations are not imported.

2. Map source and targets

Create i18n.yml:

3. Upload and translate

Upload the source catalog from Files, or sync it with the CLI:
Start a file translation job. Review units in the Content Editor. Keys appear as MainWindow|Welcome back and MainWindow|Open|verb. %1, %n, %L1, and %Ln stay in the string. Keep every placeholder when you edit a translation. Rich text stays escaped (&lt;b&gt;); only <byte> is stored as an XML child.

4. Download and compile

Download translations or pull reconstructed catalogs:
Open the .ts file in Qt Linguist if you want a desktop review pass. Then ship the .qm files with the application.

Next steps