Questions tagged [qt-linguist]

Qt Linguist is a tool for adding translations to Qt applications. Release managers, translators, and developers can use Qt Linguist to accomplish this tasks.

Qt Linguist can be run from the taskbar menu, or by double clicking the desktop icon, or by entering the command linguist at the command line.

The Qt Linguist main window is divided into several, dockable subwindows arranged around a central translation area. The context list is normally shown on the left, and the source code, string list, and either the phrases and guesses, or the warnings are shown above and below the translations area.

Qt Linguist can automatically check whether your translation strings pass a list of validation tests. Validation test failures are shown in the warnings window. If the warnings window is not visible, click the Warnings tab at the bottom of the main window.

Qt Linguist makes use of four kinds of files:

  • TS translation source files are human-readable XML files containing source phrases and their translations. These files are usually created and updated by lupdate and are specific to an application.
  • .xlf XLIFF files are human-readable XML files that adhere to the international XML Localization Interchange File Format. Qt Linguist can be used to edit XLIFF files generated by other programs. However, for standard Qt projects, only the TS file format is used. Note: The minimum supported version for XLIFF format files is 1.1. XLIFF 1.0 version files are not supported.
  • QM Qt message files are binary files that contain translations used by an application at run-time. These files are generated by lrelease, but can also be generated by Qt Linguist.
  • .qph Qt phrase book files are human-readable XML files containing standard phrases and their translations. These files are created and updated by Qt Linguist and may be used by any number of projects and applications.
55 questions
1
vote
1 answer

Qt translations with arguments

I've run into a problem using Qt to dynamically translate an application. All strings shown in the UI are wrapped in tr() calls, so I can see them in the QtLinguist. My problem now is this: Let's say I have a string with a placeholder %1: tr("Foo…
Daniel Below
  • 128
  • 1
  • 6
1
vote
2 answers

Engineering English not showing on UI

This is my QML code: Text { id: helloText //: Hello World text //% "Hello World" //~ Context No specific context text: qsTrId("hello-world-id"); anchors.top: parent.top } Excerpt from the Qt documentation here: The…
ramtheconqueror
  • 1,907
  • 1
  • 22
  • 35
0
votes
1 answer

PyQt - QTabWidget doesn't change language all tab when use Qt Linguist

I'm facing an issue. I use Qt Linguist for multi language app. If use for QWidget, it work well. But when i use with QTabWidget, it just change language in one tab, other tab do not update language. Anyone help me, please Example: I have button in…
HaiAnh
  • 27
  • 6
0
votes
1 answer

How to properly change Qt translation line (string) so it would be seen in Linguist

I'm working with existed code (.qml) and need to change line that translates by QTranslator with qm/ts translation files. For example, the line in .qml file was: item.text = qsTr("Old") So I change it to: item.text = qsTr("New") But Linguist see…
0
votes
0 answers

Trade Mark symbol not recognized by Qt Linguist

I'm trying to pass a text to Qt Linguist in which I want to make the ™ symbol appear. This text is tagged with QT_TR_NOOP so that Qt Linguist can recognize it. Qt Linguist recognizes the text to be translated, but does not display the ™ symbol in…
Martin Denion
  • 352
  • 1
  • 3
  • 22
0
votes
0 answers

QT FILE *.TS doesn't created after build with cmake. How to create translations file?

I have to create QT translations file and this is the main cmakelist file of project: cmake_minimum_required(VERSION 3.13) project(rainbow VERSION 0.0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED…
pablodepas87
  • 197
  • 1
  • 16
0
votes
0 answers

How to generate language file using linguist and lrelease

I have some code in a proprietary language. Its specially generated to make "plugin-code" and formulars. The main program is developed in c++. The code looks like a$ = pm("Datum") b$ = pm("Seite %1!", page$) The first argument in the pm() function…
Andy A.
  • 1,392
  • 5
  • 15
  • 28
0
votes
1 answer

How to translate a program into a language with QtLinguist in C++?

I wrote code on QtCreator to translate the GUI of my application into English and Spanish. This application was written in French. The .ts translation files have been generated. And I translated strings to English on QtLinguist (but not Spanish),…
user16610334
0
votes
1 answer

Qt Linguist QM file not being loaded

I am using QT Linguist 5.13.2 on Windows 10. The project has a number of translation files which all work, apart from the one for Italian. Here is an snippet of the relevant code where the option is mapped to a qm file: void…
TenG
  • 3,843
  • 2
  • 25
  • 42
0
votes
1 answer

Qt Qml tree model menu with translations

I am trying to make an app with live translation of text in a large tree model menu structure, in the same manner as: https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/itemviews/simpletreemodel?h=5.15 The item's "data" is a QString that is…
0
votes
2 answers

Can Qt lrelease tool process XLIFF files instead of ts-files?

In the documentation of the Qt lrelease tool I read, that .ts files can be compiled to .qm binaries using following command: lrelease.exe main_en.ts languages\main_fr.ts Is it possible to take .xliff files as well as input instead of the .ts files…
Marcel Müller
  • 368
  • 3
  • 17
0
votes
1 answer

Why lupdate not include qml qstr string into .ts file?

I have this .pro file : TEMPLATE = subdirs SUBDIRS += internal app app.depends = internal app.subdir = src/app internal.subdir = src/internal TRANSLATIONS = \ $$PWD/translations/croatian.ts \ $$PWD/translations/danish.ts \ …
pablodepas87
  • 197
  • 1
  • 16
0
votes
0 answers

Qt : Connect translator with a qml object

I start to have quite a decent software but I would like to translate it, so I added a combobox in my settings menu. I would like the program to translate when the user selects his language inside the combobox. I already translated using Linguist…
wissou
  • 9
0
votes
0 answers

CMake. How to find all files to translate their in Qt5Linguist?

I am trying to use Qt for my large project with different subprojects. I need to find all *.cpp *.h *.ui files to create *.ts files and apply them for qt5_create_translation. Could you help me how to do it? I tried to use file(GLOB…
Marat
  • 1
  • 1
0
votes
1 answer

QT Linguist ts file names in pro file

How does QT Linguist know the ts file defined in the project file is for a specific language? (Is the "_ja" characters in the name how it determines the language? I couldn't find anything in the documentation.) I have a ts file defined as…