QuasarAppLib
|
The Locales class for parese local files Example : More...
#include <locales.h>
Signals | |
void | sigTranslationChanged () |
sigTranslationChanged Emited when set new locale for application. | |
Static Public Member Functions | |
static bool | setLocale (const QLocale &locale, bool force=false) |
setLocale This method sets locale for application and loaded all translations for this locale. | |
static bool | init (const QList< QLocale > &locales, const QSet< QString > &location={}) |
init This method initialize translations of applictaion. | |
static bool | init (const QLocale &locale=QLocale::system(), const QSet< QString > &location={}) |
init This method initialize translation of applictaion. | |
static void | addLocation (const QString &location) |
addLocation This method add location for qm files. Use This method if you create a own library with translations supports. | |
static Locales * | instance () |
instance This method return pointer to the Locales service. | |
static const QLocale & | currentLocate () |
currentLocate This method return current locate of applicatuon. | |
static QString | tr (const char *source, const QLocale &locale) |
tr This method will translate single string to choosed language. | |
The Locales class for parese local files Example :
addLocation This method add location for qm files. Use This method if you create a own library with translations supports.
location | This is a new location of the qm files. |
Definition at line 237 of file locales.cpp.
currentLocate This method return current locate of applicatuon.
Definition at line 142 of file locales.cpp.
|
static |
init This method initialize translations of applictaion.
locales | This is list of locales that you want to locad to application cache. See info about QLocale. |
location | Path to folder with qm files. example (:/tr). |
Definition at line 157 of file locales.cpp.
|
static |
init This method initialize translation of applictaion.
locale | See info about QLocale. |
location | Path to folder with qm files. example (:/tr). |
Definition at line 162 of file locales.cpp.
|
static |
instance This method return pointer to the Locales service.
Definition at line 218 of file locales.cpp.
setLocale This method sets locale for application and loaded all translations for this locale.
locale | This is new locale. |
Definition at line 152 of file locales.cpp.
|
signal |
sigTranslationChanged Emited when set new locale for application.
tr This method will translate single string to choosed language.
source | This is source string of translations. |
locale | This is choosed language. |
Definition at line 147 of file locales.cpp.