aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/qml-i18n/qml-i18n.qml
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-08-12 15:24:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-13 14:52:27 +0200
commitf0e285381800c0809e5bfd3a4871a2283ea10fb9 (patch)
tree0f3718937db9bd89a335b29029abcc8c73785a8f /examples/qml/qml-i18n/qml-i18n.qml
parent65aaea88d9ad2d01f39e76b9ccae0930e67aef9f (diff)
Doc: Renamed and moved examples/qml/i18n to examples/qml/qml-i18n
-the generated HTML page conflicts with the i18n.html page from qtdoc. -edited the content. Task-number: QTBUG-32580 Change-Id: I32ded1913d9faecb95e28043983e957ccd0e8749 Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'examples/qml/qml-i18n/qml-i18n.qml')
-rw-r--r--examples/qml/qml-i18n/qml-i18n.qml60
1 files changed, 60 insertions, 0 deletions
diff --git a/examples/qml/qml-i18n/qml-i18n.qml b/examples/qml/qml-i18n/qml-i18n.qml
new file mode 100644
index 0000000000..00fc310a6c
--- /dev/null
+++ b/examples/qml/qml-i18n/qml-i18n.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ 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 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
+ }
+ }
+}