summaryrefslogtreecommitdiffstats
path: root/examples/tools/i18n
diff options
context:
space:
mode:
authorQt by Nokia <qt-info@nokia.com>2011-04-27 12:05:43 +0200
committeraxis <qt-info@nokia.com>2011-04-27 12:05:43 +0200
commit38be0d13830efd2d98281c645c3a60afe05ffece (patch)
tree6ea73f3ec77f7d153333779883e8120f82820abe /examples/tools/i18n
Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12
Diffstat (limited to 'examples/tools/i18n')
-rw-r--r--examples/tools/i18n/i18n.pro28
-rw-r--r--examples/tools/i18n/i18n.qrc18
-rw-r--r--examples/tools/i18n/languagechooser.cpp166
-rw-r--r--examples/tools/i18n/languagechooser.h85
-rw-r--r--examples/tools/i18n/main.cpp54
-rw-r--r--examples/tools/i18n/mainwindow.cpp95
-rw-r--r--examples/tools/i18n/mainwindow.h76
-rw-r--r--examples/tools/i18n/translations/i18n_ar.qmbin0 -> 736 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_ar.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_cs.qmbin0 -> 796 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_cs.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_de.qmbin0 -> 848 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_de.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_el.qmbin0 -> 804 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_el.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_en.qmbin0 -> 810 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_en.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_eo.qmbin0 -> 806 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_eo.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_fr.qmbin0 -> 844 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_fr.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_it.qmbin0 -> 808 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_it.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_jp.qmbin0 -> 722 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_jp.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_ko.qmbin0 -> 690 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_ko.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_no.qmbin0 -> 804 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_no.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_ru.qmbin0 -> 806 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_ru.ts59
-rw-r--r--examples/tools/i18n/translations/i18n_sv.qmbin0 -> 814 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_sv.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_zh.qmbin0 -> 700 bytes
-rw-r--r--examples/tools/i18n/translations/i18n_zh.ts57
35 files changed, 1322 insertions, 0 deletions
diff --git a/examples/tools/i18n/i18n.pro b/examples/tools/i18n/i18n.pro
new file mode 100644
index 0000000000..fded91971c
--- /dev/null
+++ b/examples/tools/i18n/i18n.pro
@@ -0,0 +1,28 @@
+HEADERS = languagechooser.h \
+ mainwindow.h
+SOURCES = languagechooser.cpp \
+ main.cpp \
+ mainwindow.cpp
+RESOURCES += i18n.qrc
+TRANSLATIONS += translations/i18n_ar.ts \
+ translations/i18n_cs.ts \
+ translations/i18n_de.ts \
+ translations/i18n_el.ts \
+ translations/i18n_en.ts \
+ translations/i18n_eo.ts \
+ translations/i18n_fr.ts \
+ translations/i18n_it.ts \
+ translations/i18n_jp.ts \
+ translations/i18n_ko.ts \
+ translations/i18n_no.ts \
+ translations/i18n_ru.ts \
+ translations/i18n_sv.ts \
+ translations/i18n_zh.ts
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/i18n
+sources.files = $$SOURCES $$HEADERS $$RESOURCES translations i18n.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/i18n
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/tools/i18n/i18n.qrc b/examples/tools/i18n/i18n.qrc
new file mode 100644
index 0000000000..16a89f140b
--- /dev/null
+++ b/examples/tools/i18n/i18n.qrc
@@ -0,0 +1,18 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>translations/i18n_ar.qm</file>
+ <file>translations/i18n_cs.qm</file>
+ <file>translations/i18n_de.qm</file>
+ <file>translations/i18n_el.qm</file>
+ <file>translations/i18n_en.qm</file>
+ <file>translations/i18n_eo.qm</file>
+ <file>translations/i18n_fr.qm</file>
+ <file>translations/i18n_it.qm</file>
+ <file>translations/i18n_jp.qm</file>
+ <file>translations/i18n_ko.qm</file>
+ <file>translations/i18n_no.qm</file>
+ <file>translations/i18n_ru.qm</file>
+ <file>translations/i18n_sv.qm</file>
+ <file>translations/i18n_zh.qm</file>
+</qresource>
+</RCC>
diff --git a/examples/tools/i18n/languagechooser.cpp b/examples/tools/i18n/languagechooser.cpp
new file mode 100644
index 0000000000..888e6aca83
--- /dev/null
+++ b/examples/tools/i18n/languagechooser.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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 Nokia Corporation 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$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "languagechooser.h"
+#include "mainwindow.h"
+
+#ifdef Q_WS_MAC
+QT_BEGIN_NAMESPACE
+extern void qt_mac_set_menubar_merge(bool merge);
+QT_END_NAMESPACE
+#endif
+
+LanguageChooser::LanguageChooser(QWidget *parent)
+ : QDialog(parent, Qt::WindowStaysOnTopHint)
+{
+ groupBox = new QGroupBox("Languages");
+
+ QGridLayout *groupBoxLayout = new QGridLayout;
+
+ QStringList qmFiles = findQmFiles();
+ for (int i = 0; i < qmFiles.size(); ++i) {
+ QCheckBox *checkBox = new QCheckBox(languageName(qmFiles[i]));
+ qmFileForCheckBoxMap.insert(checkBox, qmFiles[i]);
+ connect(checkBox, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled()));
+ groupBoxLayout->addWidget(checkBox, i / 2, i % 2);
+ }
+ groupBox->setLayout(groupBoxLayout);
+
+ buttonBox = new QDialogButtonBox;
+
+ showAllButton = buttonBox->addButton("Show All",
+ QDialogButtonBox::ActionRole);
+ hideAllButton = buttonBox->addButton("Hide All",
+ QDialogButtonBox::ActionRole);
+
+ connect(showAllButton, SIGNAL(clicked()), this, SLOT(showAll()));
+ connect(hideAllButton, SIGNAL(clicked()), this, SLOT(hideAll()));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(groupBox);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+#ifdef Q_WS_MAC
+ qt_mac_set_menubar_merge(false);
+#endif
+
+ setWindowTitle("I18N");
+}
+
+bool LanguageChooser::eventFilter(QObject *object, QEvent *event)
+{
+ if (event->type() == QEvent::Close) {
+ MainWindow *window = qobject_cast<MainWindow *>(object);
+ if (window) {
+ QCheckBox *checkBox = mainWindowForCheckBoxMap.key(window);
+ if (checkBox)
+ checkBox->setChecked(false);
+ }
+ }
+ return QWidget::eventFilter(object, event);
+}
+
+void LanguageChooser::closeEvent(QCloseEvent * /* event */)
+{
+ qApp->quit();
+}
+
+void LanguageChooser::checkBoxToggled()
+{
+ QCheckBox *checkBox = qobject_cast<QCheckBox *>(sender());
+ MainWindow *window = mainWindowForCheckBoxMap[checkBox];
+ if (!window) {
+ QTranslator translator;
+ translator.load(qmFileForCheckBoxMap[checkBox]);
+ qApp->installTranslator(&translator);
+
+ window = new MainWindow;
+ window->setPalette(colorForLanguage(checkBox->text()));
+
+ window->installEventFilter(this);
+ mainWindowForCheckBoxMap.insert(checkBox, window);
+ }
+ window->setVisible(checkBox->isChecked());
+}
+
+void LanguageChooser::showAll()
+{
+ foreach (QCheckBox *checkBox, qmFileForCheckBoxMap.keys())
+ checkBox->setChecked(true);
+}
+
+void LanguageChooser::hideAll()
+{
+ foreach (QCheckBox *checkBox, qmFileForCheckBoxMap.keys())
+ checkBox->setChecked(false);
+}
+
+QStringList LanguageChooser::findQmFiles()
+{
+ QDir dir(":/translations");
+ QStringList fileNames = dir.entryList(QStringList("*.qm"), QDir::Files,
+ QDir::Name);
+ QMutableStringListIterator i(fileNames);
+ while (i.hasNext()) {
+ i.next();
+ i.setValue(dir.filePath(i.value()));
+ }
+ return fileNames;
+}
+
+QString LanguageChooser::languageName(const QString &qmFile)
+{
+ QTranslator translator;
+ translator.load(qmFile);
+
+ return translator.translate("MainWindow", "English");
+}
+
+QColor LanguageChooser::colorForLanguage(const QString &language)
+{
+ uint hashValue = qHash(language);
+ int red = 156 + (hashValue & 0x3F);
+ int green = 156 + ((hashValue >> 6) & 0x3F);
+ int blue = 156 + ((hashValue >> 12) & 0x3F);
+ return QColor(red, green, blue);
+}
diff --git a/examples/tools/i18n/languagechooser.h b/examples/tools/i18n/languagechooser.h
new file mode 100644
index 0000000000..15378df7f3
--- /dev/null
+++ b/examples/tools/i18n/languagechooser.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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 Nokia Corporation 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$
+**
+****************************************************************************/
+
+#ifndef LANGUAGECHOOSER_H
+#define LANGUAGECHOOSER_H
+
+#include <QDialog>
+#include <QMap>
+#include <QStringList>
+
+QT_BEGIN_NAMESPACE
+class QAbstractButton;
+class QCheckBox;
+class QDialogButtonBox;
+class QGroupBox;
+QT_END_NAMESPACE
+class MainWindow;
+
+class LanguageChooser : public QDialog
+{
+ Q_OBJECT
+
+public:
+ LanguageChooser(QWidget *parent = 0);
+
+protected:
+ bool eventFilter(QObject *object, QEvent *event);
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void checkBoxToggled();
+ void showAll();
+ void hideAll();
+
+private:
+ QStringList findQmFiles();
+ QString languageName(const QString &qmFile);
+ QColor colorForLanguage(const QString &language);
+
+ QGroupBox *groupBox;
+ QDialogButtonBox *buttonBox;
+ QAbstractButton *showAllButton;
+ QAbstractButton *hideAllButton;
+ QMap<QCheckBox *, QString> qmFileForCheckBoxMap;
+ QMap<QCheckBox *, MainWindow *> mainWindowForCheckBoxMap;
+};
+
+#endif
diff --git a/examples/tools/i18n/main.cpp b/examples/tools/i18n/main.cpp
new file mode 100644
index 0000000000..ebc7a2bb27
--- /dev/null
+++ b/examples/tools/i18n/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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 Nokia Corporation 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$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "languagechooser.h"
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(i18n);
+
+ QApplication app(argc, argv);
+ LanguageChooser chooser;
+ chooser.show();
+ return app.exec();
+}
diff --git a/examples/tools/i18n/mainwindow.cpp b/examples/tools/i18n/mainwindow.cpp
new file mode 100644
index 0000000000..8e1b14160f
--- /dev/null
+++ b/examples/tools/i18n/mainwindow.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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 Nokia Corporation 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$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+static const char * const listEntries[] = {
+ QT_TRANSLATE_NOOP("MainWindow", "First"),
+ QT_TRANSLATE_NOOP("MainWindow", "Second"),
+ QT_TRANSLATE_NOOP("MainWindow", "Third"),
+ 0
+};
+
+MainWindow::MainWindow()
+{
+ centralWidget = new QWidget;
+ setCentralWidget(centralWidget);
+
+ createGroupBox();
+
+ listWidget = new QListWidget;
+ for (int i = 0; listEntries[i]; ++i)
+ listWidget->addItem(tr(listEntries[i]));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(groupBox);
+ mainLayout->addWidget(listWidget);
+ centralWidget->setLayout(mainLayout);
+
+ exitAction = new QAction(tr("E&xit"), this);
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->setPalette(QPalette(Qt::red));
+ fileMenu->addAction(exitAction);
+
+ setWindowTitle(tr("Language: %1").arg(tr("English")));
+ statusBar()->showMessage(tr("Internationalization Example"));
+
+ if (tr("LTR") == "RTL")
+ setLayoutDirection(Qt::RightToLeft);
+}
+
+void MainWindow::createGroupBox()
+{
+ groupBox = new QGroupBox(tr("View"));
+ perspectiveRadioButton = new QRadioButton(tr("Perspective"));
+ isometricRadioButton = new QRadioButton(tr("Isometric"));
+ obliqueRadioButton = new QRadioButton(tr("Oblique"));
+ perspectiveRadioButton->setChecked(true);
+
+ QVBoxLayout *groupBoxLayout = new QVBoxLayout;
+ groupBoxLayout->addWidget(perspectiveRadioButton);
+ groupBoxLayout->addWidget(isometricRadioButton);
+ groupBoxLayout->addWidget(obliqueRadioButton);
+ groupBox->setLayout(groupBoxLayout);
+}
diff --git a/examples/tools/i18n/mainwindow.h b/examples/tools/i18n/mainwindow.h
new file mode 100644
index 0000000000..dff0767742
--- /dev/null
+++ b/examples/tools/i18n/mainwindow.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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 Nokia Corporation 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$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QGroupBox;
+class QLabel;
+class QListWidget;
+class QMenu;
+class QRadioButton;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+ void createGroupBox();
+
+ QWidget *centralWidget;
+ QLabel *label;
+ QGroupBox *groupBox;
+ QListWidget *listWidget;
+ QRadioButton *perspectiveRadioButton;
+ QRadioButton *isometricRadioButton;
+ QRadioButton *obliqueRadioButton;
+ QMenu *fileMenu;
+ QAction *exitAction;
+};
+
+#endif
diff --git a/examples/tools/i18n/translations/i18n_ar.qm b/examples/tools/i18n/translations/i18n_ar.qm
new file mode 100644
index 0000000000..a134c468bb
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ar.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_ar.ts b/examples/tools/i18n/translations/i18n_ar.ts
new file mode 100644
index 0000000000..a7ec2c9404
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ar.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>First</source>
+ <translation>أول</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>مثال التدويل</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>متماثل</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>اللغة: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>العربية</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>مصمت</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>منظور</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>ثانى</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>ثالث</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>مرئى</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>أخرج</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>الملف</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>RTL</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_cs.qm b/examples/tools/i18n/translations/i18n_cs.qm
new file mode 100644
index 0000000000..5b7ff95b05
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_cs.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_cs.ts b/examples/tools/i18n/translations/i18n_cs.ts
new file mode 100644
index 0000000000..6c4dee9b2e
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_cs.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Pohled</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Soubor</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Konec</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>První</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Třetí</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Jayzk: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Český</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Nakloněný</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Druhý</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrický</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektivní</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Ukázka lokalizace</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_de.qm b/examples/tools/i18n/translations/i18n_de.qm
new file mode 100644
index 0000000000..177fc49b8b
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_de.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_de.ts b/examples/tools/i18n/translations/i18n_de.ts
new file mode 100644
index 0000000000..249a61d020
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_de.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Ansicht</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Datei</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>Be&amp;enden</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Erstens</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Drittens</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Deutsch</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Sprache: %1</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Schief</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Zweitens</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrisch</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektivisch</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internationalisierungsbeispiel</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_el.qm b/examples/tools/i18n/translations/i18n_el.qm
new file mode 100644
index 0000000000..5483291bb0
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_el.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_el.ts b/examples/tools/i18n/translations/i18n_el.ts
new file mode 100644
index 0000000000..d23a0aad3e
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_el.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Αρχείο</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>Έ&amp;ξοδος</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Πρώτο</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Παράδειγμα διεθνοποίησης</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Ισομετρική</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Γλώσσα: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Ελληνικά</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Πλάγια</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Προοπτική</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Δεύτερο</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Τρίτο</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>Όψη</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_en.qm b/examples/tools/i18n/translations/i18n_en.qm
new file mode 100644
index 0000000000..9190ac7e6f
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_en.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_en.ts b/examples/tools/i18n/translations/i18n_en.ts
new file mode 100644
index 0000000000..ca38e958c1
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_en.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>E&amp;xit</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;File</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internationalization Example</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Language: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>English</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>View</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspective</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometric</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Oblique</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>First</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Second</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Third</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_eo.qm b/examples/tools/i18n/translations/i18n_eo.qm
new file mode 100644
index 0000000000..a8457bef06
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_eo.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_eo.ts b/examples/tools/i18n/translations/i18n_eo.ts
new file mode 100644
index 0000000000..16a37becd9
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_eo.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Dosiero</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Unue</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Ekzemplo pri internaciigo</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometria</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Lingvo: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Esperanto</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Oblikva</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektiva</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Due</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Trie</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>Aspekto</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Fini</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_fr.qm b/examples/tools/i18n/translations/i18n_fr.qm
new file mode 100644
index 0000000000..3e8a69b80d
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_fr.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_fr.ts b/examples/tools/i18n/translations/i18n_fr.ts
new file mode 100644
index 0000000000..0012892ef2
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_fr.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Vue</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Fichier</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Quitter</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Premier</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Troisième</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Langue : %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Français</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Oblique</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Deuxième</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isométrique</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspective</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Exemple d&apos;internationalisation</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_it.qm b/examples/tools/i18n/translations/i18n_it.qm
new file mode 100644
index 0000000000..3dffd30548
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_it.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_it.ts b/examples/tools/i18n/translations/i18n_it.ts
new file mode 100644
index 0000000000..d516a277b6
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_it.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>First</source>
+ <translation>Primo</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Esempio di localizzazione</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrica</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Lingua: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Italiano</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Obliqua</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Prospettica</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Secondo</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Terzo</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>Vista</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Esci</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;File</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_jp.qm b/examples/tools/i18n/translations/i18n_jp.qm
new file mode 100644
index 0000000000..017bc96cfc
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_jp.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_jp.ts b/examples/tools/i18n/translations/i18n_jp.ts
new file mode 100644
index 0000000000..067b5a8a0b
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_jp.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>ファイル(&amp;F)</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>終了(&amp;X)</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>第一行</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>国際化(i18n)の例</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>等角投影法</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>言語: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>日本語</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>斜め投影法</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>遠近法</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>第二行</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>第三行</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>表示方式</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_ko.qm b/examples/tools/i18n/translations/i18n_ko.qm
new file mode 100644
index 0000000000..d61b93db39
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ko.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_ko.ts b/examples/tools/i18n/translations/i18n_ko.ts
new file mode 100644
index 0000000000..bfd5924518
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ko.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>파일&amp;F</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>종료&amp;X</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>첫번째</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>국제화 예제</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>등측도</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>언어 : %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>한국어</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>빗각</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>원근화법</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>두번째</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>세번째</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>보기</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_no.qm b/examples/tools/i18n/translations/i18n_no.qm
new file mode 100644
index 0000000000..c84b0d74ba
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_no.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_no.ts b/examples/tools/i18n/translations/i18n_no.ts
new file mode 100644
index 0000000000..2e06974997
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_no.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Vis</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Fil</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Avslutt</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Første</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Tredje</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Språk: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Norsk</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Skjevt</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Andre</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrisk</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektiv</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internasjonaliseringseksempel</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_ru.qm b/examples/tools/i18n/translations/i18n_ru.qm
new file mode 100644
index 0000000000..a76e1b8703
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ru.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_ru.ts b/examples/tools/i18n/translations/i18n_ru.ts
new file mode 100644
index 0000000000..748cc12fd9
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ru.ts
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="ru">
+<defaultcodec></defaultcodec>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Вид</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>Файл</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>Выход</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Первый</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Третий</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Язык: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Русский</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Курсив</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Второй</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Изометрический</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Перспектива</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Пример интернационализации</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_sv.qm b/examples/tools/i18n/translations/i18n_sv.qm
new file mode 100644
index 0000000000..7204b308b1
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_sv.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_sv.ts b/examples/tools/i18n/translations/i18n_sv.ts
new file mode 100644
index 0000000000..ac4ab98bd3
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_sv.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Visa</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Arkiv</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Avsluta</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Första</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Tredje</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Språk: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Svenska</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Skevt</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Andra</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometriskt</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektivt</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internationaliseringsexempel</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_zh.qm b/examples/tools/i18n/translations/i18n_zh.qm
new file mode 100644
index 0000000000..32053f4633
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_zh.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_zh.ts b/examples/tools/i18n/translations/i18n_zh.ts
new file mode 100644
index 0000000000..3b715470a8
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_zh.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>视图</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>文件[&amp;F]</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>退出[&amp;x]</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>第一个</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>第三个</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>语言: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>简体中文</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>斜投影</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>第二个</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>等角投影</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>透视投影</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>国际化范例</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>