19 #ifndef TRANSLATIONHANDLER_H
20 #define TRANSLATIONHANDLER_H
A class handling the available translations.
const QList< TranslationInfo > & getTranslations() const
Get a list of available translations.
TranslationHandler(QObject *parent=nullptr)
int getLanguageIndexByCode(const QString &code) const
Find language in the list and return its index.
const QString & getCurrentLanguage() const
Get currently selected translation.
QTranslator * mTranslator
Translator class instance.
bool setLanguage(const QString &code)
Set active translation.
void addTranslation(const char *name, const char *filename)
Add new translation to list of available translations.
QList< TranslationInfo > mTranslations
List of available translations.
QString suggestLanguage() const
Get translation suggestion for the system.
QString mCurrentLanguage
ISO 639 language code of the currently selected translation.
Information for one translation.
QString mName
Readable name for the translation (e.g.
QString mCode
ISO 639 language code for the translation (e.g.
QString mFilename
Filename for the translation.