diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-02-28 20:05:16 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-02-28 20:05:16 (GMT) |
commit | e34b371ea67afa800ffa71d9d8039db83018957f (patch) | |
tree | 346e7dd5fd46fcbce07b4c7806c903d71adf79ad /Swift | |
parent | 49316cf512eb3d5a10576e363631b5090ab5e1a8 (diff) | |
download | swift-e34b371ea67afa800ffa71d9d8039db83018957f.zip swift-e34b371ea67afa800ffa71d9d8039db83018957f.tar.bz2 |
Use built-in Qt 4.8 language selection mechanism.
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/QtUI/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp index 2eef379..bb1c662 100644 --- a/Swift/QtUI/main.cpp +++ b/Swift/QtUI/main.cpp @@ -32,8 +32,12 @@ int main(int argc, char* argv[]) { boost::filesystem::path someTranslationPath = Swift::PlatformApplicationPathProvider(SWIFT_APPLICATION_NAME).getResourcePath("/translations/swift_nl.qm"); QTranslator qtTranslator; if (!someTranslationPath.empty()) { +#if QT_VERSION >= 0x040800 + qtTranslator.load(QLocale::system(), QString(SWIFT_APPLICATION_NAME).toLower(), "_", someTranslationPath.parent_path().string().c_str()); +#else //std::cout << "Loading " << std::string(QLocale::system().name().toUtf8()) << std::endl; qtTranslator.load(QString(SWIFT_APPLICATION_NAME).toLower() + "_" + QLocale::system().name(), someTranslationPath.parent_path().string().c_str()); +#endif } app.installTranslator(&qtTranslator); QtTranslator swiftTranslator; |