KTextTemplate::AbstractLocalizer
#include <KTextTemplate/AbstractLocalizer>
Public Member Functions | |
AbstractLocalizer () | |
virtual | ~AbstractLocalizer () |
virtual QString | currentLocale () const =0 |
virtual void | loadCatalog (const QString &path, const QString &catalog)=0 |
virtual QString | localize (const QVariant &variant) const |
virtual QString | localizeContextString (const QString &string, const QString &context, const QVariantList &arguments={}) const =0 |
virtual QString | localizeDate (const QDate &date, QLocale::FormatType formatType=QLocale::ShortFormat) const =0 |
virtual QString | localizeDateTime (const QDateTime &dateTime, QLocale::FormatType formatType=QLocale::ShortFormat) const =0 |
virtual QString | localizeMonetaryValue (qreal value, const QString ¤cyCode={}) const =0 |
virtual QString | localizeNumber (int number) const =0 |
virtual QString | localizeNumber (qreal number) const =0 |
virtual QString | localizePluralContextString (const QString &string, const QString &pluralForm, const QString &context, const QVariantList &arguments={}) const =0 |
virtual QString | localizePluralString (const QString &string, const QString &pluralForm, const QVariantList &arguments={}) const =0 |
virtual QString | localizeString (const QString &string, const QVariantList &arguments={}) const =0 |
virtual QString | localizeTime (const QTime &time, QLocale::FormatType formatType=QLocale::ShortFormat) const =0 |
virtual void | popLocale ()=0 |
virtual void | pushLocale (const QString &localeName)=0 |
virtual void | unloadCatalog (const QString &catalog)=0 |
Detailed Description
Interface for implementing an internationalization system.
This class defines an interface for accessing an internationalization, such as QLocale/QTranslator or gettext/KLocale.
Definition at line 34 of file abstractlocalizer.h.
Constructor & Destructor Documentation
◆ AbstractLocalizer()
|
default |
Constructor.
◆ ~AbstractLocalizer()
|
virtualdefault |
Destructor.
Member Function Documentation
◆ currentLocale()
|
pure virtual |
Returns the current locale as a string.
Implemented in KTextTemplate::QtLocalizer.
◆ loadCatalog()
|
pure virtual |
Loads the catalog
from path
.
Implemented in KTextTemplate::QtLocalizer.
◆ localize()
Processes the data in variant
into a localized string.
The base implementation can localize numbers, dates and times, and strings.
Definition at line 22 of file abstractlocalizer.cpp.
◆ localizeContextString()
|
pure virtual |
Localizes string
, disambiguated by context
with the specified arguments
for substitution.
Implemented in KTextTemplate::QtLocalizer.
◆ localizeDate()
|
pure virtual |
Localizes date
with the specified formatType
.
Implemented in KTextTemplate::QtLocalizer.
◆ localizeDateTime()
|
pure virtual |
Localizes dateTime
with the specified formatType
.
Implemented in KTextTemplate::QtLocalizer.
◆ localizeMonetaryValue()
|
pure virtual |
Localizes value
as a monetary value in the currency specified by currencyCode
.
Implemented in KTextTemplate::QtLocalizer.
◆ localizeNumber() [1/2]
|
pure virtual |
Localizes number
.
Implemented in KTextTemplate::QtLocalizer.
◆ localizeNumber() [2/2]
|
pure virtual |
Localizes number
.
Implemented in KTextTemplate::QtLocalizer.
◆ localizePluralContextString()
|
pure virtual |
Localizes string
or its pluralForm
, disambiguated by context
with the specified arguments
for substitution.
Implemented in KTextTemplate::QtLocalizer.
◆ localizePluralString()
|
pure virtual |
Localizes string
or its pluralForm
with the specified arguments
for substitution.
Implemented in KTextTemplate::QtLocalizer.
◆ localizeString()
|
pure virtual |
Localizes string
with the specified arguments
for substitution.
Implemented in KTextTemplate::QtLocalizer.
◆ localizeTime()
|
pure virtual |
Localizes time
with the specified formatType
.
Implemented in KTextTemplate::QtLocalizer.
◆ popLocale()
|
pure virtual |
Makes this localizer use the previous locale for output.
Implemented in KTextTemplate::QtLocalizer.
◆ pushLocale()
|
pure virtual |
Makes this localizer use the locale specified by localeName
for output.
Implemented in KTextTemplate::QtLocalizer.
◆ unloadCatalog()
|
pure virtual |
Unloads the catalog
.
Implemented in KTextTemplate::QtLocalizer.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:39:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.