diff options
author | Simon Rettberg | 2017-12-15 14:39:25 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-12-15 14:39:25 +0100 |
commit | bd6829395e87becf24b97d288fe71e06d8f7b16a (patch) | |
tree | 97950eb82812cb682b4f539ec2392f2adf231972 /src | |
parent | German translation (diff) | |
download | beamergui-bd6829395e87becf24b97d288fe71e06d8f7b16a.tar.gz beamergui-bd6829395e87becf24b97d288fe71e06d8f7b16a.tar.xz beamergui-bd6829395e87becf24b97d288fe71e06d8f7b16a.zip |
Apply proper translation at runtime
Diffstat (limited to 'src')
-rw-r--r-- | src/i18n/de.ts | 2 | ||||
-rw-r--r-- | src/main.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/i18n/de.ts b/src/i18n/de.ts index 481a35e..6e4a48a 100644 --- a/src/i18n/de.ts +++ b/src/i18n/de.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="de_DE"> +<TS version="2.1" language="de_DE"> <context> <name>TimeOutDialog</name> <message> diff --git a/src/main.cpp b/src/main.cpp index 7ae6558..801484a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,14 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); + // System strings + QTranslator *qtTranslator = new QTranslator(&a); + qtTranslator->load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + a.installTranslator(qtTranslator); + // App specific + QTranslator *translator = new QTranslator(&a); + translator->load(QLocale::system(), ":"); + a.installTranslator(translator); Widget w; w.show(); return a.exec(); |