[vlmc-devel] LanguageHelper: On windows and mac search qt ts files in app dir.

Rohit Yadav git at videolan.org
Thu Jul 28 10:01:40 CEST 2011


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Thu Jul 28 13:42:47 2011 +0530| [28db48669131221b9c65bcb4912734baa3fe08f6] | committer: Rohit Yadav

LanguageHelper: On windows and mac search qt ts files in app dir.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=28db48669131221b9c65bcb4912734baa3fe08f6
---

 src/Gui/LanguageHelper.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/Gui/LanguageHelper.cpp b/src/Gui/LanguageHelper.cpp
index faad41c..ecb7782 100644
--- a/src/Gui/LanguageHelper.cpp
+++ b/src/Gui/LanguageHelper.cpp
@@ -69,13 +69,21 @@ LanguageHelper::languageChanged( const QString &lang  )
     {
         m_translator->load( TS_PREFIX + QLocale::system().name(), ":/ts/" );
         m_qtTranslator->load( "qt_" + QLocale::system().name(),
+#if defined( Q_OS_WIN32 ) || defined( Q_WS_MAC )
+                              qApp->applicationDirPath() + "/ts/" );
+#else
                               QLibraryInfo::location( QLibraryInfo::TranslationsPath ) );
+#endif
     }
     else
     {
         m_translator->load( TS_PREFIX + lang, ":/ts/" );
         m_qtTranslator->load( "qt_" + lang,
+#if defined( Q_OS_WIN32 ) || defined( Q_WS_MAC )
+                              qApp->applicationDirPath() + "/ts/" );
+#else
                               QLibraryInfo::location( QLibraryInfo::TranslationsPath ) );
+#endif
     }
 
     qApp->installTranslator( m_translator );   // For translating VLMC UI strings



More information about the Vlmc-devel mailing list