summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-15 14:39:25 +0100
committerSimon Rettberg2017-12-15 14:39:25 +0100
commitbd6829395e87becf24b97d288fe71e06d8f7b16a (patch)
tree97950eb82812cb682b4f539ec2392f2adf231972 /src
parentGerman translation (diff)
downloadbeamergui-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.ts2
-rw-r--r--src/main.cpp8
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();