| Grantlee 5.3.0
    | 
Provides internationalization based on QLocale and QTranslator. More...
#include <qtlocalizer.h>

| Public Member Functions | |
| QtLocalizer (const QLocale &locale=QLocale::system()) | |
| ~QtLocalizer () override | |
| QString | currentLocale () const override | 
| void | installTranslator (QTranslator *translator, const QString &localeName=QLocale::system().name()) | 
| void | loadCatalog (const QString &path, const QString &catalog) override | 
| QString | localizeContextString (const QString &string, const QString &context, const QVariantList &arguments={}) const override | 
| QString | localizeDate (const QDate &date, QLocale::FormatType formatType=QLocale::ShortFormat) const override | 
| QString | localizeDateTime (const QDateTime &dateTime, QLocale::FormatType formatType=QLocale::ShortFormat) const override | 
| QString | localizeMonetaryValue (qreal value, const QString ¤cyCode={}) const override | 
| QString | localizeNumber (int number) const override | 
| QString | localizeNumber (qreal number) const override | 
| QString | localizePluralContextString (const QString &string, const QString &pluralForm, const QString &context, const QVariantList &arguments={}) const override | 
| QString | localizePluralString (const QString &string, const QString &pluralForm, const QVariantList &arguments={}) const override | 
| QString | localizeString (const QString &string, const QVariantList &arguments={}) const override | 
| QString | localizeTime (const QTime &time, QLocale::FormatType formatType=QLocale::ShortFormat) const override | 
| void | popLocale () override | 
| void | pushLocale (const QString &localeName) override | 
| void | setAppTranslatorPath (const QString &path) | 
| void | setAppTranslatorPrefix (const QString &prefix) | 
| void | unloadCatalog (const QString &catalog) override | 
|  Public Member Functions inherited from Grantlee::AbstractLocalizer | |
| AbstractLocalizer () | |
| virtual | ~AbstractLocalizer () | 
| virtual QString | localize (const QVariant &variant) const | 
This class implements access to the Qt Localization system. Localizable types such as strings, numbers, dates and times can be processed.
Definition at line 55 of file qtlocalizer.h.
| Grantlee::QtLocalizer::QtLocalizer | ( | const QLocale & | locale = QLocale::system() | ) | 
Constructs a new QtLocalizer using the locale 
| 
 | override | 
Destructor
| 
 | overridevirtual | 
Returns the current locale as a string.
Implements Grantlee::AbstractLocalizer.
| void Grantlee::QtLocalizer::installTranslator | ( | QTranslator * | translator, | 
| const QString & | localeName = QLocale::system().name() ) | 
Install a translator to use for a particular localeName.
| 
 | overridevirtual | 
Loads the catalog from path. 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes string, disambiguated by context with the specified arguments for substitution 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes date with the specified formatType 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes dateTime with the specified formatType 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes value as a monetary value in the currency specified by currencyCode. 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes number 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes number 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes string or its pluralForm, disambiguated by context with the specified arguments for substitution 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes string or its pluralForm with the specified arguments for substitution 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes string with the specified arguments for substitution 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Localizes time with the specified formatType 
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Makes this localizer use the previous locale for output.
Implements Grantlee::AbstractLocalizer.
| 
 | overridevirtual | 
Makes this localizer use the locale specified by localeName for output. 
Implements Grantlee::AbstractLocalizer.
| void Grantlee::QtLocalizer::setAppTranslatorPath | ( | const QString & | path | ) | 
Set the path to look for translations of the application strings.
| void Grantlee::QtLocalizer::setAppTranslatorPrefix | ( | const QString & | prefix | ) | 
Set the prefix of translation files. For example, if the German translation file is called myapp_de_DE.qm, the prefix should be set to myapp_. 
| 
 | overridevirtual | 
Unloads the catalog 
Implements Grantlee::AbstractLocalizer.