Commit 28db4866 authored by Rohit Yadav's avatar Rohit Yadav

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

parent 4c706a30
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment