Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qt_deploy_translations.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-deploy-translations.html
6
\ingroup cmake-commands-qtcore
7
8
\title qt_deploy_translations
9
\keyword qt6_deploy_translations
10
11
\summary {Deploy Qt translations needed by an executable.}
12
13
\include cmake-find-package-core.qdocinc
14
15
Unlike most other CMake commands provided by Qt, \c{qt_deploy_translations()}
16
can only be called from a deployment script. It cannot be called directly by the
17
project during the configure stage.
18
19
\cmakecommandsince 6.5
20
\preliminarycmakecommand
21
\note This command does not usually need to be called directly. It is used
22
internally by other higher level commands, but projects wishing to
23
implement more customized deployment logic may find it useful.
24
25
\section1 Synopsis
26
27
\badcode
28
qt_deploy_translations(
29
[CATALOGS catalogs]
30
[LOCALES locales]
31
[LCONVERT lconvert_executable]
32
[VERBOSE]
33
)
34
\endcode
35
36
\section1 Description
37
38
When installing an application, it may be desirable to also install the
39
translations that belong to the used Qt modules. The \c qt_deploy_translations
40
command collects the necessary \c{.qm} file from the Qt installation and
41
compiles them into one \c{qt_${language}.qm} file per language. The \c{.qm}
42
files are installed into \c{QT_DEPLOY_TRANSLATIONS_DIR}.
43
44
\section1 Arguments
45
46
The \c LOCALES argument specifies for which locales translations should be
47
deployed. This is a list of language/region combinations as described in
48
\l{Changing the Target Locale}{Qt Linguist's manual for translators}. Examples
49
for valid locales are: \c{de}, \c{pl}, or \c{pt_BR}.
50
51
If \c LOCALES is omitted, then all available locales are deployed.
52
53
The \c CATALOGS argument specifies a list of \l{Available
54
Catalogs}{translation catalogs} to be deployed. If this argument is
55
omitted, then all catalogs are deployed that belong to any Qt module
56
that is used in the project via \c{find_package}.
57
58
The \c LCONVERT argument specifies the \c lconvert executable that is used to
59
combine the catalogs. By default, the Qt installation's \c lconvert is used.
60
61
For debugging purposes, the \c VERBOSE argument can be set to turn on diagnostic
62
messages.
63
64
\sa QT_DEPLOY_TRANSLATIONS_DIR
65
66
\section1 Example
67
68
The following example deploys Danish and German translations of the Qt
69
libraries.
70
71
\badcode
72
qt_deploy_translations(
73
LOCALES da de
74
)
75
\endcode
76
*/
qtbase
src
corelib
doc
src
cmake
qt_deploy_translations.qdoc
Generated on
for Qt by
1.14.0