1#ifndef H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_INTERNATIONALIZER_HPP
2#define H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_INTERNATIONALIZER_HPP
4#include "internal/common.hpp"
5#include "Singleton.hpp"
22#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
24 QML_UNCREATABLE(
"Internationalizer is a singleton")
30 friend class test_Internationalizer;
36 Q_PROPERTY(
QString uiLanguage READ uiLanguage WRITE setUILanguage NOTIFY uiLanguageChanged)
58 void setUILanguage(
const QString & uiLanguage);
63 Q_INVOKABLE
void loadQtTranslation();
68 Q_INVOKABLE
void unloadQtTranslation();
89 Q_INVOKABLE
void loadTranslation(
const QString & product,
bool dependencies =
true);
95 Q_INVOKABLE
void unloadTranslation(
const QString & product);
102 Q_INVOKABLE
void unloadTranslations(
bool qt =
true);
121 Q_INVOKABLE
QStringList standardTranslationDirectories()
const;
129 Q_INVOKABLE
QStringList additionalTranslationDirectories()
const;
137 Q_INVOKABLE
void setAdditionalTranslationDirectories(
const QStringList & additionalDirectories);
154 void loadTranslation(
QStringList & skippedProducts,
const QString & product,
bool dependencies);
158 void updateQtTranslation(
QTranslator & translator);
Internationalization singleton.
Definition: Internationalizer.hpp:19
void uiLanguageChanged()
User interface language has changed.
Singleton template.
Definition: Singleton.hpp:32
Definition: constants.hpp:6