fixed multimedia lang file load
This commit is contained in:
parent
49e3222786
commit
6fec8fc1fb
1 changed files with 0 additions and 38 deletions
38
main.cpp
38
main.cpp
|
@ -156,44 +156,6 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
a.installTranslator(&EqtTranslator1);
|
||||
QTranslator EqtTranslator2;
|
||||
if (language == "System" || language.trimmed() == "")
|
||||
{
|
||||
QString languageName = QLocale::system().name();
|
||||
QStringList langList = languageName.split("_");
|
||||
if (langList.length() >= 1)
|
||||
{
|
||||
if (QFile::exists(langpath + "/qtmultimedia_" + langList.at(0) + ".qm"))
|
||||
{
|
||||
EqtTranslator2.load(langpath + "/qtmultimedia_" + langList.at(0) + ".qm");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString languageName = language;
|
||||
QStringList langList = languageName.split("_");
|
||||
if (langList.length() >= 1)
|
||||
{
|
||||
if (QFile::exists(langpath + "/qtmultimedia_" + langList.at(0) + ".qm"))
|
||||
{
|
||||
EqtTranslator2.load(langpath + "/qtmultimedia_" + langList.at(0) + ".qm");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (trsf)
|
||||
{
|
||||
QString languageName = QLocale::system().name();
|
||||
QStringList langList = languageName.split("_");
|
||||
if (langList.length() >= 1)
|
||||
{
|
||||
if (QFile::exists(langpath + "/qtmultimedia_" + langList.at(0) + ".qm"))
|
||||
{
|
||||
EqtTranslator2.load(langpath + "/qtmultimedia_" + langList.at(0) + ".qm");
|
||||
}
|
||||
}
|
||||
}
|
||||
a.installTranslator(&EqtTranslator2);
|
||||
#else
|
||||
QTranslator EqtTranslator;
|
||||
if (language == "System" || language.trimmed() == "")
|
||||
|
|
Loading…
Reference in a new issue