Commit deeef530 authored by Liang Qi's avatar Liang Qi Committed by Eike Ziller

Load Chinese translations correcly

Load Simplified and Traditional Chinese correctly via System
Language option.

This change is only valid with Qt 5.

Task-number: QTCREATORBUG-8253
Change-Id: I068c96d26e97ff534004ae53747dd6fc460edee2
Reviewed-by: default avatarOswald Buddenhagen <>
Reviewed-by: default avatarEike Ziller <>
parent 0f0fa3c2
......@@ -356,7 +356,11 @@ int main(int argc, char **argv)
const QString &creatorTrPath = QCoreApplication::applicationDirPath()
+ QLatin1String(SHARE_PATH "/translations");
foreach (QString locale, uiLanguages) {
#if (QT_VERSION >= 0x050000)
locale = QLocale(locale).name();
locale.replace(QLatin1Char('-'), QLatin1Char('_')); // work around QTBUG-25973
if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString &qtTrFile = QLatin1String("qt_") + locale;
Markdown is supported
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