aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/qml-i18n/Main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/qml-i18n/Main.qml')
-rw-r--r--examples/qml/qml-i18n/Main.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/qml/qml-i18n/Main.qml b/examples/qml/qml-i18n/Main.qml
new file mode 100644
index 0000000000..8d414348dd
--- /dev/null
+++ b/examples/qml/qml-i18n/Main.qml
@@ -0,0 +1,25 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Window
+
+Window {
+ visible: true
+ width: 640; height: 480
+
+ Column {
+ anchors.fill: parent; spacing: 20
+
+ Text {
+ text: "If a translation is available for the system language (eg. French) then the " +
+ "string below will be translated (eg. 'Bonjour'). Otherwise it will show 'Hello'."
+ width: parent.width; wrapMode: Text.WordWrap
+ }
+
+ Text {
+ text: qsTr("Hello")
+ font.pointSize: 25; anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+}