KTextTemplate
qtlocalizer.cpp
108QString QtLocalizerPrivate::translate(const QString &input, const QString &context, int count) const
120 result = translator->translate("GR_FILENAME", input.toUtf8().constData(), context.toUtf8().constData(), count);
125 return QCoreApplication::translate("GR_FILENAME", input.toUtf8().constData(), context.toUtf8().constData(), count);
127 result = translator->translate("GR_FILENAME", input.toUtf8().constData(), context.toUtf8().constData(), count);
185QString QtLocalizer::localizeDateTime(const QDateTime &dateTime, QLocale::FormatType formatType) const
233QString QtLocalizer::localizeContextString(const QString &string, const QString &context, const QVariantList &arguments) const
257QString QtLocalizer::localizePluralString(const QString &string, const QString &pluralForm, const QVariantList &_arguments) const
280 (void)qtTranslator->load(QStringLiteral("qt_") + localeName, QLibraryInfo::path(QLibraryInfo::TranslationsPath));
Provides internationalization based on QLocale and QTranslator.
Definition qtlocalizer.h:47
QString localizePluralString(const QString &string, const QString &pluralForm, const QVariantList &arguments={}) const override
Localizes string or its pluralForm with the specified arguments for substitution.
Definition qtlocalizer.cpp:257
QString localizeDate(const QDate &date, QLocale::FormatType formatType=QLocale::ShortFormat) const override
Localizes date with the specified formatType.
Definition qtlocalizer.cpp:173
void installTranslator(QTranslator *translator, const QString &localeName=QLocale::system().name())
Install a translator to use for a particular localeName.
Definition qtlocalizer.cpp:163
QString localizeContextString(const QString &string, const QString &context, const QVariantList &arguments={}) const override
Localizes string, disambiguated by context with the specified arguments for substitution.
Definition qtlocalizer.cpp:233
QString currentLocale() const override
Returns the current locale as a string.
Definition qtlocalizer.cpp:267
void setAppTranslatorPath(const QString &path)
Set the path to look for translations of the application strings.
Definition qtlocalizer.cpp:151
QString localizeMonetaryValue(qreal value, const QString ¤cyCode={}) const override
Localizes value as a monetary value in the currency specified by currencyCode.
Definition qtlocalizer.cpp:203
void popLocale() override
Makes this localizer use the previous locale for output.
Definition qtlocalizer.cpp:293
void loadCatalog(const QString &path, const QString &catalog) override
Loads the catalog from path.
Definition qtlocalizer.cpp:300
QString localizeTime(const QTime &time, QLocale::FormatType formatType=QLocale::ShortFormat) const override
Localizes time with the specified formatType.
Definition qtlocalizer.cpp:179
QString localizeDateTime(const QDateTime &dateTime, QLocale::FormatType formatType=QLocale::ShortFormat) const override
Localizes dateTime with the specified formatType.
Definition qtlocalizer.cpp:185
QtLocalizer(const QLocale &locale=QLocale::system())
Constructs a new QtLocalizer using the locale.
Definition qtlocalizer.cpp:141
QString localizePluralContextString(const QString &string, const QString &pluralForm, const QString &context, const QVariantList &arguments={}) const override
Localizes string or its pluralForm, disambiguated by context with the specified arguments for substit...
Definition qtlocalizer.cpp:247
void pushLocale(const QString &localeName) override
Makes this localizer use the locale specified by localeName for output.
Definition qtlocalizer.cpp:273
QString localizeString(const QString &string, const QVariantList &arguments={}) const override
Localizes string with the specified arguments for substitution.
Definition qtlocalizer.cpp:240
void setAppTranslatorPrefix(const QString &prefix)
Set the prefix of translation files.
Definition qtlocalizer.cpp:157
void unloadCatalog(const QString &catalog) override
Unloads the catalog.
Definition qtlocalizer.cpp:317
The KTextTemplate namespace holds all public KTextTemplate API.
Definition Mainpage.dox:8
const char * constData() const const
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
QString toString(QStringView format, QCalendar cal) const const
iterator insert(const Key &key, const T &value)
TranslationsPath
QString path(LibraryPath p)
void append(QList< T > &&value)
void clear()
bool isEmpty() const const
T & last()
void push_back(parameter_type value)
FormatType
QString name() const const
QString arg(Args &&... args) const const
const QChar at(qsizetype position) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype length() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QByteArray toUtf8() const const
bool load(const QLocale &locale, const QString &filename, const QString &prefix, const QString &directory, const QString &suffix)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.