KLocalizedString Class
Class for producing and handling localized messages. More...
Header: | #include <KLocalizedString> |
CMake: | find_package(KF6 REQUIRED COMPONENTS I18n) target_link_libraries(mytarget PRIVATE KF6::I18n) |
Public Functions
KLocalizedString() | |
KLocalizedString | ignoreMarkup() const |
KLocalizedString | inContext(const QString &key, const QString &value) const |
bool | isEmpty() const |
KLocalizedString | relaxSubs() const |
KLocalizedString | subs(QChar a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(const KLocalizedString &a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(const QString &a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(int a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(long a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(qlonglong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(qulonglong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(uint a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(ulong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const |
KLocalizedString | subs(double a, int fieldWidth = 0, char format = 'g', int precision = -1, QChar fillChar = QLatin1Char(' ')) const |
QString | toString() const |
QString | toString(Kuit::VisualFormat format) const |
QString | toString(const QStringList &languages) const |
QString | toString(const char *domain) const |
(since 5.64) QByteArray | untranslatedText() const |
KLocalizedString | withDomain(const char *domain) const |
KLocalizedString | withFormat(Kuit::VisualFormat format) const |
KLocalizedString | withLanguages(const QStringList &languages) const |
Static Public Members
void | addDomainLocaleDir(const QByteArray &domain, const QString &path) |
QByteArray | applicationDomain() |
(since 5.0) QSet<QString> | availableApplicationTranslations() |
(since 5.0) QSet<QString> | availableDomainTranslations(const QByteArray &domain) |
void | clearLanguages() |
bool | isApplicationTranslatedInto(const QString &language) |
(since 5.20.0) QStringList | languages() |
QString | localizedFilePath(const QString &filePath) |
QString | removeAcceleratorMarker(const QString &label) |
void | setApplicationDomain(const QByteArray &domain) |
void | setLanguages(const QStringList &languages) |
Related Non-Members
QString | i18n(const char *text, const int &arg, ...) |
QString | i18nc(const char *context, const char *text, const int &arg, ...) |
QString | i18ncp(const char *context, const char *singular, const char *plural, const int &arg, ...) |
QString | i18nd(const char *domain, const char *text, const int &arg, ...) |
QString | i18ndc(const char *domain, const char *context, const char *text, const int &arg, ...) |
QString | i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const int &arg, ...) |
QString | i18ndp(const char *domain, const char *singular, const char *plural, const int &arg, ...) |
QString | i18np(const char *singular, const char *plural, const int &arg, ...) |
KLocalizedString | ki18n(const char *text) |
KLocalizedString | ki18nc(const char *context, const char *text) |
KLocalizedString | ki18ncp(const char *context, const char *singular, const char *plural) |
KLocalizedString | ki18nd(const char *domain, const char *text) |
KLocalizedString | ki18ndc(const char *domain, const char *context, const char *text) |
KLocalizedString | ki18ndcp(const char *domain, const char *context, const char *singular, const char *plural) |
KLocalizedString | ki18ndp(const char *domain, const char *singular, const char *plural) |
KLocalizedString | ki18np(const char *singular, const char *plural) |
KLocalizedString | kxi18n(const char *text) |
KLocalizedString | kxi18nc(const char *context, const char *text) |
KLocalizedString | kxi18ncp(const char *context, const char *singular, const char *plural) |
KLocalizedString | kxi18nd(const char *domain, const char *text) |
KLocalizedString | kxi18ndc(const char *domain, const char *context, const char *text) |
KLocalizedString | kxi18ndcp(const char *domain, const char *context, const char *singular, const char *plural) |
KLocalizedString | kxi18ndp(const char *domain, const char *singular, const char *plural) |
KLocalizedString | kxi18np(const char *singular, const char *plural) |
QString | tr2i18n(const char *text, const char *comment = nullptr) |
QString | tr2i18nd(const char *domain, const char *text, const char *comment = nullptr) |
QString | tr2xi18n(const char *text, const char *comment = nullptr) |
QString | tr2xi18nd(const char *domain, const char *text, const char *comment = nullptr) |
QString | xi18n(const char *text, const int &arg, ...) |
QString | xi18nc(const char *context, const char *text, const int &arg, ...) |
QString | xi18ncp(const char *context, const char *singular, const char *plural, const int &arg, ...) |
QString | xi18nd(const char *domain, const char *text, const int &arg, ...) |
QString | xi18ndc(const char *domain, const char *context, const char *text, const int &arg, ...) |
QString | xi18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const int &arg, ...) |
QString | xi18ndp(const char *domain, const char *singular, const char *plural, const int &arg, ...) |
QString | xi18np(const char *singular, const char *plural, const int &arg, ...) |
Detailed Description
KLocalizedString handles translation and argument substitution and formatting of user-visible text.
KLocalizedString instances are usually not constructed directly, but through one of the wrapper *i18n* calls.
For detailed information on how to use KI18n functions please refer to prg_guide.
Member Function Documentation
[explicit]
KLocalizedString::KLocalizedString()
Construct an empty message.
Direct construction is used when another KLocalizedString instance, obtained by one of ki18n* calls, should later be assigned to directly constructed instance. Before the assignment happens, directly constructed instance is not valid for finalization by toString methods.
See also isEmpty.
[static]
void KLocalizedString::addDomainLocaleDir(const QByteArray &domain, const QString &path)
Load locales for a domain from a specific location This is useful for resources which have their translation files outside of the usual $XDG_DATA_DIRS/locales location
domain the domain to load resources from
path the full file path to the locale directory
[static]
QByteArray KLocalizedString::applicationDomain()
Get the application's main translation domain.
Returns the domain set by setApplicationDomain.
See also setApplicationDomain().
[static, since 5.0]
QSet<QString> KLocalizedString::availableApplicationTranslations()
Get the languages for which there exists the translation catalog file for the set application translation domain.
The application domain is set by setApplicationDomain. If the application domain was not set, empty set is returned. If the application domain was set, the language set will always contain at least the source code language (en_US).
Returns set of language codes for existing translation catalogs
This function was introduced in 5.0.
See also setApplicationDomain.
[static, since 5.0]
QSet<QString> KLocalizedString::availableDomainTranslations(const QByteArray &domain)
Get the languages for which a translation catalog file for the passed translation domain exists.
If the translation domain was not specified in the domain parameter an empty set is returned.
If the application domain was set, the language set will always contain at least the source code language (en_US).
domain query for translations of a specific domain, if an empty QByteArray is passed, an empty set will be returned
Returns set of language codes for existing translation catalogs
This function was introduced in 5.0.
See also setApplicationDomain and availableApplicationTranslations.
[static]
void KLocalizedString::clearLanguages()
Clear override languages.
This clears the override languages, going back to those provided by the locale.
See also setLanguages and languages.
KLocalizedString KLocalizedString::ignoreMarkup() const
Do not resolve KUIT markup.
If the message is markup-aware (constructed by one of *xi18n* calls), this function can be used to make it non-markup-aware. This may be useful for debugging markup.
Returns updated KLocalizedString
KLocalizedString KLocalizedString::inContext(const QString &key, const QString &value) const
Add dynamic context to the message.
See dyn_ctxt for use cases.
key context key
value context value
Returns updated KLocalizedString
[static]
bool KLocalizedString::isApplicationTranslatedInto(const QString &language)
Check whether the translation catalog file in the given language for the set application translation domain exists.
language the language code to check
Returns true
if the translation catalog for language exits, false
otherwise
See also setApplicationDomain.
bool KLocalizedString::isEmpty() const
Check whether the message is empty.
The message is considered empty if the object was constructed via the default constructor.
Empty messages are not valid for finalization. The behavior of calling toString on them is undefined. In debug mode, an error mark may appear in the returned string.
Returns true
if the message is empty, false
otherwise
[static, since 5.20.0]
QStringList KLocalizedString::languages()
Get the languages for which translations will be made.
Returned languages are ordered with decreasing priority.
Returns languages ordered list of language codes
This function was introduced in 5.20.0.
See also setLanguages and clearLanguages.
[static]
QString KLocalizedString::localizedFilePath(const QString &filePath)
Find a path to the localized file for the given original path.
This is intended mainly for non-text resources (images, sounds, etc). Text resources should be handled in more specific ways.
Possible localized paths are checked in turn by priority of set languages, in form of <dirname>/l10n/<lang>/<basename>, where <dirname> and <basename> are those of the original path, and <lang> is the language code.
filePath path to the original file
Returns path to the localized file if found, original path otherwise
KLocalizedString KLocalizedString::relaxSubs() const
Relax matching between placeholders and arguments.
Normally the placeholders should start from %1 and have no gaps, and on finalization there must be exactly as many arguments supplied through subs methods as there are unique plaecholders. If this is not satisfied, in debug mode warnings are printed and the finalized string may contain error marks.
This method relaxes the placeholder-argument matching, such that there must only be an argument available for every present unique placeholder (taking placeholder numbers to be 1-based indices into the argument list). This can come useful in some situations.
Returns updated KLocalizedString
[static]
QString KLocalizedString::removeAcceleratorMarker(const QString &label)
Remove accelerator marker from a UI text label.
Accelerator marker is not always a plain ampersand (&), so it is not enough to just remove it by QString::remove. The label may contain escaped markers ("&&") which must be resolved and skipped, as well as CJK-style markers ("Foo (&F)") where the whole parenthesis construct should be removed. Therefore always use this function to remove accelerator marker from UI labels.
label UI label which may contain an accelerator marker
Returns label without the accelerator marker
[static]
void KLocalizedString::setApplicationDomain(const QByteArray &domain)
Set the given domain as application's main domain.
This function must be called in applications, in order to have any translations at all. It should never be called in libraries. This allows to check whether the application is translated into a given language, so that if it is not, translations from underlying libraries will not appear even if they are translated. This prevents mixing of translated and untranslated text in the user interface.
This function should be called right after creating the instance of QCoreApplication or one of its subclasses. At that time the locale setup has been made, including what is hooked into the QCoreApplication startup, like KXMLGUI's language switching support. So the initialisation done by this function sees all the data it should.
domain the translation domain of the application
See also applicationDomain().
[static]
void KLocalizedString::setLanguages(const QStringList &languages)
Set the languages for which translations will be made.
This overrides the languages provided by the locale. Languages should be ordered with decreasing priority.
languages ordered list of language codes
See also setLocale, clearLanguages, and languages.
KLocalizedString KLocalizedString::subs(QChar a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const
Substitute a QChar argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(const KLocalizedString &a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const
Substitute another KLocalizedString into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(const QString &a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const
Substitute a QString argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(int a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const
Substitute an int argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
base the radix used to represent the number as a string. Valid values range from 2 to 36
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(long a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const
Substitute a long argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
base the radix used to represent the number as a string. Valid values range from 2 to 36
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(qlonglong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const
Substitute a long long argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
base the radix used to represent the number as a string. Valid values range from 2 to 36
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(qulonglong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const
Substitute an unsigned long long argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
base the radix used to represent the number as a string. Valid values range from 2 to 36
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(uint a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const
Substitute an unsigned int argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
base the radix used to represent the number as a string. Valid values range from 2 to 36
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(ulong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const
Substitute an unsigned long argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
base the radix used to represent the number as a string. Valid values range from 2 to 36
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
KLocalizedString KLocalizedString::subs(double a, int fieldWidth = 0, char format = 'g', int precision = -1, QChar fillChar = QLatin1Char(' ')) const
Substitute a double argument into the message.
a the argument
fieldWidth width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left
format type of floating point formatting, like in QString::arg
precision number of digits after the decimal separator
fillChar the character used to fill up the empty places when field width is greater than argument width
Returns updated KLocalizedString
QString KLocalizedString::toString() const
Finalize the translation.
Creates translated QString, with placeholders substituted by arguments given by KLocalizedString::subs methods. Translated text is searched for and arguments are formatted based on the global locale.
If there was any mismatch between placeholders and arguments, in debug mode the returned string may contain error marks.
Returns finalized translation
QString KLocalizedString::toString(Kuit::VisualFormat format) const
Like toString, but resolve KUIT markup into given visual format.
Given visual format overrides that implied by the context UI marker or set earlier using withFormat. If the message is not markup-aware, this is same as toString without arguments.
format the target visual format
Returns finalized translation
QString KLocalizedString::toString(const QStringList &languages) const
Like toString, but look for translation only in given languages.
Given languages override languages defined by the global locale, and any languages set earlier using withLanguages. If languages is empty, original message is returned.
languages list of language codes (by decreasing priority) Returns finalized translation
QString KLocalizedString::toString(const char *domain) const
Like toString, but look for translation in the given domain.
Given domain overrides any set earlier using withDomain.
domain the translation domain
Returns finalized translation
[since 5.64]
QByteArray KLocalizedString::untranslatedText() const
Returns the untranslated text.
This function was introduced in 5.64.
KLocalizedString KLocalizedString::withDomain(const char *domain) const
Indicate to look for translation in the given domain.
domain the translation domain Returns updated KLocalizedString
KLocalizedString KLocalizedString::withFormat(Kuit::VisualFormat format) const
Indicate to resolve KUIT markup into given visual format.
If the message is not markup-aware, this has no effect.
format the target visual format
Returns updated KLocalizedString
KLocalizedString KLocalizedString::withLanguages(const QStringList &languages) const
Indicate to look for translation only in given languages.
languages list of language codes (by decreasing priority)
Returns updated KLocalizedString
Related Non-Members
QString i18n(const char *text, const int &arg, ...)
Translate a string and substitute any arguments.
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString i18nc(const char *context, const char *text, const int &arg, ...)
Translate a string with context and substitute any arguments.
context context of the string
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString i18ncp(const char *context, const char *singular, const char *plural, const int &arg, ...)
Translate a string with context and plural and substitute any arguments.
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString i18nd(const char *domain, const char *text, const int &arg, ...)
Translate a string from domain and substitute any arguments.
domain domain in which to look for translations
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString i18ndc(const char *domain, const char *context, const char *text, const int &arg, ...)
Translate a string from domain with context and substitute any arguments.
domain domain in which to look for translations
context context of the string
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const int &arg, ...)
Translate a string from domain with context and plural and substitute any arguments.
domain domain in which to look for translations
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString i18ndp(const char *domain, const char *singular, const char *plural, const int &arg, ...)
Translate a string from domain with plural and substitute any arguments.
domain domain in which to look for translations
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString i18np(const char *singular, const char *plural, const int &arg, ...)
Translate a string with plural and substitute any arguments.
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
KLocalizedString ki18n(const char *text)
Create non-finalized translated string.
text string to translate
Returns non-finalized translated string
KLocalizedString ki18nc(const char *context, const char *text)
Create non-finalized translated string with context.
context context of the string
text string to translate
Returns non-finalized translated string
KLocalizedString ki18ncp(const char *context, const char *singular, const char *plural)
Create non-finalized translated string with context and plural.
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
KLocalizedString ki18nd(const char *domain, const char *text)
Create non-finalized translated string from domain.
domain domain in which to look for translations
text string to translate
Returns non-finalized translated string
KLocalizedString ki18ndc(const char *domain, const char *context, const char *text)
Create non-finalized translated string from domain with context.
domain domain in which to look for translations
context context of the string
text string to translate
Returns non-finalized translated string
KLocalizedString ki18ndcp(const char *domain, const char *context, const char *singular, const char *plural)
Create non-finalized translated string from domain with context and plural.
domain domain in which to look for translations
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
KLocalizedString ki18ndp(const char *domain, const char *singular, const char *plural)
Create non-finalized translated string from domain with plural.
domain domain in which to look for translations
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
KLocalizedString ki18np(const char *singular, const char *plural)
Create non-finalized translated string with plural.
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
KLocalizedString kxi18n(const char *text)
Create non-finalized markup-aware translated string.
text string to translate
Returns non-finalized translated string
KLocalizedString kxi18nc(const char *context, const char *text)
Create non-finalized markup-aware translated string with context.
context context of the string
text string to translate
Returns non-finalized translated string
KLocalizedString kxi18ncp(const char *context, const char *singular, const char *plural)
Create non-finalized markup-aware translated string. with context and plural.
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
KLocalizedString kxi18nd(const char *domain, const char *text)
Create non-finalized markup-aware translated string from domain.
domain domain in which to look for translations
text string to translate
Returns non-finalized translated string
KLocalizedString kxi18ndc(const char *domain, const char *context, const char *text)
Create non-finalized markup-aware translated string from domain with context.
domain domain in which to look for translations
context context of the string
text string to translate
Returns non-finalized translated string
KLocalizedString kxi18ndcp(const char *domain, const char *context, const char *singular, const char *plural)
Create non-finalized markup-aware translated string from domain with context and plural.
domain domain in which to look for translations
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
KLocalizedString kxi18ndp(const char *domain, const char *singular, const char *plural)
Create non-finalized markup-aware translated string from domain with plural.
domain domain in which to look for translations
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
KLocalizedString kxi18np(const char *singular, const char *plural)
Create non-finalized markup-aware translated string with plural.
singular singular form of the string to translate
plural plural form of the string to translate
Returns non-finalized translated string
QString tr2i18n(const char *text, const char *comment = nullptr)
Redirect Qt's uic-generated translation calls to Ki18n.
Use -tr tr2i18n option to uic to have it redirect calls.
text string to translate
comment Qt equivalent of disambiguation context
Returns translated string
QString tr2i18nd(const char *domain, const char *text, const char *comment = nullptr)
Like tr2i18n, but look for translation in a specific domain.
Use -tr tr2i18nd option to uic to have it redirect calls.
domain domain in which to look for translations
text string to translate
comment Qt equivalent of disambiguation context
Returns translated string
QString tr2xi18n(const char *text, const char *comment = nullptr)
Like tr2i18n, but when UI strings are KUIT markup-aware.
Use -tr tr2xi18n option to uic to have it redirect calls.
text markup-aware string to translate
comment Qt equivalent of disambiguation context
Returns translated string
QString tr2xi18nd(const char *domain, const char *text, const char *comment = nullptr)
Like tr2xi18n, but look for translation in a specific domain.
Use -tr tr2xi18nd option to uic to have it redirect calls.
domain domain in which to look for translations
text markup-aware string to translate
comment Qt equivalent of disambiguation context
Returns translated string
QString xi18n(const char *text, const int &arg, ...)
Translate a markup-aware string and substitute any arguments.
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString xi18nc(const char *context, const char *text, const int &arg, ...)
Translate a markup-aware string with context and substitute any arguments.
context context of the string
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString xi18ncp(const char *context, const char *singular, const char *plural, const int &arg, ...)
Translate a markup-aware string with context and plural and substitute any arguments.
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString xi18nd(const char *domain, const char *text, const int &arg, ...)
Translate a markup-aware string from domain and substitute any arguments.
domain domain in which to look for translations
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString xi18ndc(const char *domain, const char *context, const char *text, const int &arg, ...)
Translate a markup-aware string from domain with context and substitute any arguments.
domain domain in which to look for translations
context context of the string
text string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString xi18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const int &arg, ...)
Translate a markup-aware string from domain with context and plural and substitute any arguments.
domain domain in which to look for translations
context context of the string
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString xi18ndp(const char *domain, const char *singular, const char *plural, const int &arg, ...)
Translate a markup-aware string from domain with plural and substitute any arguments.
domain domain in which to look for translations
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string
QString xi18np(const char *singular, const char *plural, const int &arg, ...)
Translate a markup-aware string with plural and substitute any arguments.
singular singular form of the string to translate
plural plural form of the string to translate
arg arguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns translated string