fix auto locale detection (#308)
Current implementation QLocale::system.language() will not correctly differs Simplified Chinese with Traditional Chinese, which is causing problems to load translations for zh_TW. This fix the problem by following the documentation here: https://doc.qt.io/qt-5/qtranslator.html#load-1
This commit is contained in:
@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) {
|
||||
QStringList trPaths = PathInfo::translationsPaths();
|
||||
|
||||
for (const QString &path: trPaths) {
|
||||
bool match = translator.load(QLocale::system().language(),
|
||||
bool match = translator.load(QLocale(),
|
||||
"Internationalization", "_",
|
||||
path);
|
||||
if (match) {
|
||||
|
||||
Reference in New Issue
Block a user