49 static bool setLocale(
const QLocale &locale,
bool force =
false);
57 static bool init(
const QList<QLocale> & locales,
58 const QSet<QString> & location = {});
66 static bool init(
const QLocale &locale = QLocale::system(),
67 const QSet<QString> & location = {});
73 static void addLocation(
const QString& location);
85 static const QLocale ¤tLocate();
94 static QString tr(
const char *source,
const QLocale& locale);
106 bool setLocalePrivate(
const QLocale &locale = QLocale::system(),
bool force =
false,
bool install =
true);
107 bool initPrivate(
const QLocale &locale = QLocale::system(),
108 const QSet<QString> &location = {});
110 bool initPrivate(
const QList<QLocale> &locales,
111 const QSet<QString> &location = {});
113 void clearCache(
const QLocale& locale);
116 void removeOldTranslation(
const QLocale& locale);
118 void addLocationPrivate(
const QString& location);
120 const QLocale ¤tLocatePrivate()
const;
122 bool findQm(QString localePrefix,
123 QList<QTranslator *> &result);
124 bool findQmPrivate(
const QString &prefix,
125 QList<QTranslator *> &qmFiles);
126 void installTranslations(QList<QTranslator *> &qmFiles);
127 QString translatePrivate(
const char *source,
const QLocale& locale);
130 QLocale _currentLocate;
131 QSet<QString> _locations;
132 QHash<QLocale, QList<QTranslator *>> _translations;