2 This file is part of the KDE libraries
3 Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #include <QtGui/QApplication>
21 #include <kstandarddirs.h>
24 #include <QTranslator>
26 #include <QLibraryInfo>
29 * MS Windows-related actions for KApplication startup.
31 * - Use Qt translation which will be usable for QFileDialog
32 * and other Qt-only GUIs. The "qt_<language>.qm" file should be stored
33 * in the same place as .po files for a given language.
37 void KApplication_init_windows()
39 //QString qt_transl_file = ::locate( "locale", KGlobal::locale()->language()
40 // + "/LC_MESSAGES/qt_" + KGlobal::locale()->language() + ".qm" );
42 QString qt_transl_file
= QString("qt_") + QLocale::system().name();
43 qt_transl_file
.truncate(5);
44 QTranslator
*qt_transl
= new QTranslator();
45 if (qt_transl
->load( qt_transl_file
,
46 QLibraryInfo::location(QLibraryInfo::TranslationsPath
)))
47 qApp
->installTranslator( qt_transl
);