Expose translator locale name.

main
Teo Mrnjavac 8 years ago
parent 0c36de68ff
commit 99ca3d768d

@ -48,6 +48,7 @@ static bool s_isAppDataDirOverridden = false;
static QTranslator* s_brandingTranslator = nullptr;
static QTranslator* s_translator = nullptr;
static QTranslator* s_qtTranslator = nullptr;
static QString s_translatorLocaleName = QString();
static bool
@ -224,6 +225,15 @@ installTranslator( const QLocale& locale,
}
QCoreApplication::installTranslator( translator );
s_qtTranslator = translator;
s_translatorLocaleName = localeName;
}
QString
translatorLocaleName()
{
return s_translatorLocaleName;
}

@ -42,6 +42,7 @@ namespace CalamaresUtils
DLLEXPORT void installTranslator( const QLocale& locale,
const QString& brandingTranslationsPrefix,
QObject* parent );
DLLEXPORT QString translatorLocaleName();
/**
* Override app data dir. Only for testing purposes.

Loading…
Cancel
Save