| 1 |
/**************************************************************************** |
| 2 |
** |
| 3 |
** Copyright (C) 2017 The Qt Company Ltd. |
| 4 |
** Contact: https://www.qt.io/licensing/ |
| 5 |
** |
| 6 |
** This file is part of the documentation of the Qt Toolkit. |
| 7 |
** |
| 8 |
** $QT_BEGIN_LICENSE:FDL$ |
| 9 |
** Commercial License Usage |
| 10 |
** Licensees holding valid commercial Qt licenses may use this file in |
| 11 |
** accordance with the commercial license agreement provided with the |
| 12 |
** Software or, alternatively, in accordance with the terms contained in |
| 13 |
** a written agreement between you and The Qt Company. For licensing terms |
| 14 |
** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 |
** information use the contact form at https://www.qt.io/contact-us. |
| 16 |
** |
| 17 |
** GNU Free Documentation License Usage |
| 18 |
** Alternatively, this file may be used under the terms of the GNU Free |
| 19 |
** Documentation License version 1.3 as published by the Free Software |
| 20 |
** Foundation and appearing in the file included in the packaging of |
| 21 |
** this file. Please review the following information to ensure |
| 22 |
** the GNU Free Documentation License version 1.3 requirements |
| 23 |
** will be met: https://www.gnu.org/licenses/fdl-1.3.html. |
| 24 |
** $QT_END_LICENSE$ |
| 25 |
** |
| 26 |
****************************************************************************/ |
| 27 |
/*! |
| 28 |
\title QML Examples - Internationalization |
| 29 |
\example qml-i18n |
| 30 |
\image qml-i18n-example.png |
| 31 |
\brief This is an internationalization example. |
| 32 |
|
| 33 |
The QML runtime automatically loads a translation from the i18n subdirectory of the root |
| 34 |
QML file, based on the system language. |
| 35 |
|
| 36 |
The files are created or updated by running: |
| 37 |
|
| 38 |
\code |
| 39 |
lupdate qml-i18n.qml -ts i18n/base.ts |
| 40 |
\endcode |
| 41 |
|
| 42 |
Translations for new languages are created by copying \e i18n/base.ts to \e i18n/qml_<lang>.ts |
| 43 |
The .ts files can then be edited with \l{Qt Linguist}: |
| 44 |
|
| 45 |
\code |
| 46 |
linguist i18n/qml_fr.ts |
| 47 |
\endcode |
| 48 |
|
| 49 |
The run-time translation files are then generated by running: |
| 50 |
|
| 51 |
\code |
| 52 |
lrelease i18n/*.ts |
| 53 |
\endcode |
| 54 |
|
| 55 |
\note On Android, please make sure to include the generated *.qm files as resources. |
| 56 |
|
| 57 |
*/ |