From 8e8cc7230301cc957a2222c0f68e120e4d373d02 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 16 Feb 2008 17:23:10 +0000 Subject: [PATCH] Add translation code to bat git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6432 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/main.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bacula/src/qt-console/main.cpp b/bacula/src/qt-console/main.cpp index 139a33778b..8a2f01667d 100644 --- a/bacula/src/qt-console/main.cpp +++ b/bacula/src/qt-console/main.cpp @@ -36,6 +36,7 @@ #include +#include #include "bat.h" MainWin *mainWin; @@ -61,9 +62,18 @@ int main(int argc, char *argv[]) app = new QApplication(argc, argv); app->setQuitOnLastWindowClosed(true); QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); + + QTranslator qtTranslator; + qtTranslator.load(QString("qt_") + QLocale::system().name()); + app->installTranslator(&qtTranslator); + QTranslator batTranslator; + batTranslator.load(QString("bat_") + QLocale::system().name()); + app->installTranslator(&batTranslator); -#ifdef ENABLE_NLS + + +#ifdef xENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain("bacula", LOCALEDIR); textdomain("bacula"); -- 2.39.5