diff options
Diffstat (limited to 'src/corelib/doc/src/cmake/qt_deploy_translations.qdoc')
-rw-r--r-- | src/corelib/doc/src/cmake/qt_deploy_translations.qdoc | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/src/corelib/doc/src/cmake/qt_deploy_translations.qdoc b/src/corelib/doc/src/cmake/qt_deploy_translations.qdoc new file mode 100644 index 0000000000..43ff23a35a --- /dev/null +++ b/src/corelib/doc/src/cmake/qt_deploy_translations.qdoc @@ -0,0 +1,76 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! +\page qt-deploy-translations.html +\ingroup cmake-commands-qtcore + +\title qt_deploy_translations +\keyword qt6_deploy_translations + +\summary {Deploy Qt translations needed by an executable.} + +\include cmake-find-package-core.qdocinc + +Unlike most other CMake commands provided by Qt, \c{qt_deploy_translations()} +can only be called from a deployment script. It cannot be called directly by the +project during the configure stage. + +\cmakecommandsince 6.5 +\preliminarycmakecommand +\note This command does not usually need to be called directly. It is used + internally by other higher level commands, but projects wishing to + implement more customized deployment logic may find it useful. + +\section1 Synopsis + +\badcode +qt_deploy_translations( + [CATALOGS catalogs] + [LOCALES locales] + [LCONVERT lconvert_executable] + [VERBOSE] +) +\endcode + +\section1 Description + +When installing an application, it may be desirable to also install the +translations that belong to the used Qt modules. The \c qt_deploy_translations +command collects the necessary \c{.qm} file from the Qt installation and +compiles them into one \c{qt_${language}.qm} file per language. The \c{.qm} +files are installed into \c{QT_DEPLOY_TRANSLATIONS_DIR}. + +\section1 Arguments + +The \c LOCALES argument specifies for which locales translations should be +deployed. This is a list of language/region combinations as described in +\l{Changing the Target Locale}{Qt Linguist's manual for translators}. Examples +for valid locales are: \c{de}, \c{pl}, or \c{pt_BR}. + +If \c LOCALES is omitted, then all available locales are deployed. + +The \c CATALOGS argument specifies a list of \l{Available +Catalogs}{translation catalogs} to be deployed. If this argument is +omitted, then all catalogs are deployed that belong to any Qt module +that is used in the project via \c{find_package}. + +The \c LCONVERT argument specifies the \c lconvert executable that is used to +combine the catalogs. By default, the Qt installation's \c lconvert is used. + +For debugging purposes, the \c VERBOSE argument can be set to turn on diagnostic +messages. + +\sa QT_DEPLOY_TRANSLATIONS_DIR + +\section1 Example + +The following example deploys Danish and German translations of the Qt +libraries. + +\badcode +qt_deploy_translations( + LOCALES da de +) +\endcode +*/ |