Commit 9328889a authored by Simon Hausmann's avatar Simon Hausmann
Browse files

Document dynamic language change in QML


Task-number: QTBUG-15602
Change-Id: I2f1cdf020dca59b27afea4b2e28792084d85e184
Reviewed-by: default avatarKavindra Palaraja <kavindra.d+qt@gmail.com>
Reviewed-by: default avatarRobin Burchell <robin.burchell@crimson.no>
Showing with 13 additions and 0 deletions
......@@ -227,6 +227,19 @@ Component.onCompleted: {
}
\endcode
\section2 9. Prepare for Dynamic Language Changes
You can change the language that Qt translation functions use by adding and
removing translators with QCoreApplication::installTranslator() and
QCoreApplication::removeTranslator(). Afterwards you can call
QQmlEngine::retranslate() to trigger a refresh of all bindings that use
translations. As a result, your user interface will switch, dynamically, to the
newly selected language.
Alternatively, you can also forward a QEvent::LanguageChange event to your
application's QQmlEngine instance or connect your own signal to
QQmlEngine::retranslate().
\section1 Localizing Your Application
Qt Quick applications use the same underlying localization system as Qt C++
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment