aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src
diff options
context:
space:
mode:
authorLucie Gérard <lucie.gerard@qt.io>2023-10-24 15:36:26 +0200
committerLucie Gérard <lucie.gerard@qt.io>2023-10-31 11:54:10 +0100
commita1f82b34b4eff7ea4b50306c05d5bc4c62cf8f1e (patch)
tree81a3ff10302c7a21f765f008925ad1ac5c9aa0e7 /src/qml/doc/src
parented3941dca23380cad521c6a897bebc5369bf1da0 (diff)
Add documentation for Translator pragma
Task-number: QTBUG-114528 Change-Id: I9921589cdc13f897ca34c770f0172c69bc40b942 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/doc/src')
-rw-r--r--src/qml/doc/src/qmllanguageref/documents/structure.qdoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/doc/src/qmllanguageref/documents/structure.qdoc b/src/qml/doc/src/qmllanguageref/documents/structure.qdoc
index 4be00b24cc..340d89d07d 100644
--- a/src/qml/doc/src/qmllanguageref/documents/structure.qdoc
+++ b/src/qml/doc/src/qmllanguageref/documents/structure.qdoc
@@ -33,6 +33,7 @@ engine interprets code. The following pragmas are exaplained in details below.
\li \c FunctionSignatureBehavior
\li \c NativeMethodBehavior
\li \c ValueTypeBehavior
+\li \c Translator
\endlist
\section2 Singleton
@@ -257,6 +258,15 @@ way to express the same operations.
\sa {Type annotations and assertions}
+\section2 Translator
+
+With this pragma you can set the context for the translations in the file.
+
+\qml
+pragma Translator: myTranslationContext
+\endqml
+
+For more information on internationalization with QML, see \l{QML: Use qsTr()}{Use qsTr}.
\section1 Imports