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
\note This command does not usually need to be called directly. It is used
21
internally by other higher level commands, but projects wishing to
22
implement more customized deployment logic may find it useful.
23
24
\section1 Synopsis
25
26
\badcode
27
qt_deploy_translations(
28
[CATALOGS catalogs]
29
[LOCALES locales]
30
[LCONVERT lconvert_executable]
31
[VERBOSE]
32
)
33
\endcode
34
35
\section1 Description
36
37
When installing an application, it may be desirable to also install the
38
translations that belong to the used Qt modules. The \c qt_deploy_translations
39
command collects the necessary \c{.qm} file from the Qt installation and
40
compiles them into one \c{qt_${language}.qm} file per language. The \c{.qm}
41
files are installed into \c{QT_DEPLOY_TRANSLATIONS_DIR}.
42
43
\section1 Arguments
44
45
The \c LOCALES argument specifies for which locales translations should be
46
deployed. This is a list of language/region combinations as described in
47
\l{Changing the Target Locale}{Qt Linguist's manual for translators}. Examples
48
for valid locales are: \c{de}, \c{pl}, or \c{pt_BR}.
49
50
If \c LOCALES is omitted, then all available locales are deployed.
51
52
The \c CATALOGS argument specifies a list of \l{Available
53
Catalogs}{translation catalogs} to be deployed. If this argument is
54
omitted, then all catalogs are deployed that belong to any Qt module
55
that is used in the project via \c{find_package}.
56
57
The \c LCONVERT argument specifies the \c lconvert executable that is used to
58
combine the catalogs. By default, the Qt installation's \c lconvert is used.
59
60
For debugging purposes, the \c VERBOSE argument can be set to turn on diagnostic
61
messages.
62
63
\sa QT_DEPLOY_TRANSLATIONS_DIR
64
65
\section1 Example
66
67
The following example deploys Danish and German translations of the Qt
68
libraries.
69
70
\badcode
71
qt_deploy_translations(
72
LOCALES da de
73
)
74
\endcode
75
*/
qtbase
src
corelib
doc
src
cmake
qt_deploy_translations.qdoc
Generated on
for Qt by
1.16.1