KI18n 5.109.0
Classes | Functions
klocalizedstring.h File Reference

Classes

class  KLocalizedString
 Class for producing and handling localized messages. More...
 

Functions

QString i18n (const char *text, const TYPE &arg...)
 Translate a string and substitute any arguments.
 
QString i18nc (const char *context, const char *text, const TYPE &arg...)
 Translate a string with context and substitute any arguments.
 
QString i18ncp (const char *context, const char *singular, const char *plural, const TYPE &arg...)
 Translate a string with context and plural and substitute any arguments.
 
QString i18nd (const char *domain, const char *text, const TYPE &arg...)
 Translate a string from domain and substitute any arguments.
 
QString i18ndc (const char *domain, const char *context, const char *text, const TYPE &arg...)
 Translate a string from domain with context and substitute any arguments.
 
QString i18ndcp (const char *domain, const char *context, const char *singular, const char *plural, const TYPE &arg...)
 Translate a string from domain with context and plural and substitute any arguments.
 
QString i18ndp (const char *domain, const char *singular, const char *plural, const TYPE &arg...)
 Translate a string from domain with plural and substitute any arguments.
 
QString i18np (const char *singular, const char *plural, const TYPE &arg...)
 Translate a string with plural and substitute any arguments.
 
KLocalizedString ki18n (const char *text)
 Create non-finalized translated string.
 
KLocalizedString ki18nc (const char *context, const char *text)
 Create non-finalized translated string with context.
 
KLocalizedString ki18ncp (const char *context, const char *singular, const char *plural)
 Create non-finalized translated string with context and plural.
 
KLocalizedString ki18nd (const char *domain, const char *text)
 Create non-finalized translated string from domain.
 
KLocalizedString ki18ndc (const char *domain, const char *context, const char *text)
 Create non-finalized translated string from domain with context.
 
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.
 
KLocalizedString ki18ndp (const char *domain, const char *singular, const char *plural)
 Create non-finalized translated string from domain with plural.
 
KLocalizedString ki18np (const char *singular, const char *plural)
 Create non-finalized translated string with plural.
 
KLocalizedString kxi18n (const char *text)
 Create non-finalized markup-aware translated string.
 
KLocalizedString kxi18nc (const char *context, const char *text)
 Create non-finalized markup-aware translated string with context.
 
KLocalizedString kxi18ncp (const char *context, const char *singular, const char *plural)
 Create non-finalized markup-aware translated string.
 
KLocalizedString kxi18nd (const char *domain, const char *text)
 Create non-finalized markup-aware translated string from domain.
 
KLocalizedString kxi18ndc (const char *domain, const char *context, const char *text)
 Create non-finalized markup-aware translated string from domain with context.
 
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.
 
KLocalizedString kxi18ndp (const char *domain, const char *singular, const char *plural)
 Create non-finalized markup-aware translated string from domain with plural.
 
KLocalizedString kxi18np (const char *singular, const char *plural)
 Create non-finalized markup-aware translated string with plural.
 
QString tr2i18n (const char *text, const char *comment=nullptr)
 Redirect Qt's uic-generated translation calls to Ki18n.
 
QString tr2i18nd (const char *domain, const char *text, const char *comment=nullptr)
 Like tr2i18n, but look for translation in a specific domain.
 
QString tr2xi18n (const char *text, const char *comment=nullptr)
 Like tr2i18n, but when UI strings are KUIT markup-aware.
 
QString tr2xi18nd (const char *domain, const char *text, const char *comment=nullptr)
 Like tr2xi18n, but look for translation in a specific domain.
 
QString xi18n (const char *text, const TYPE &arg...)
 Translate a markup-aware string and substitute any arguments.
 
QString xi18nc (const char *context, const char *text, const TYPE &arg...)
 Translate a markup-aware string with context and substitute any arguments.
 
QString xi18ncp (const char *context, const char *singular, const char *plural, const TYPE &arg...)
 Translate a markup-aware string with context and plural and substitute any arguments.
 
QString xi18nd (const char *domain, const char *text, const TYPE &arg...)
 Translate a markup-aware string from domain and substitute any arguments.
 
QString xi18ndc (const char *domain, const char *context, const char *text, const TYPE &arg...)
 Translate a markup-aware string from domain with context and substitute any arguments.
 
QString xi18ndcp (const char *domain, const char *context, const char *singular, const char *plural, const TYPE &arg...)
 Translate a markup-aware string from domain with context and plural and substitute any arguments.
 
QString xi18ndp (const char *domain, const char *singular, const char *plural, const TYPE &arg...)
 Translate a markup-aware string from domain with plural and substitute any arguments.
 
QString xi18np (const char *singular, const char *plural, const TYPE &arg...)
 Translate a markup-aware string with plural and substitute any arguments.
 

Function Documentation

◆ i18n()

QString i18n ( const char *  text,
const TYPE &  arg... 
)

Translate a string and substitute any arguments.

Parameters
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ i18nc()

QString i18nc ( const char *  context,
const char *  text,
const TYPE &  arg... 
)

Translate a string with context and substitute any arguments.

Parameters
contextcontext of the string
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ i18ncp()

QString i18ncp ( const char *  context,
const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a string with context and plural and substitute any arguments.

Parameters
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ i18nd()

QString i18nd ( const char *  domain,
const char *  text,
const TYPE &  arg... 
)

Translate a string from domain and substitute any arguments.

Parameters
domaindomain in which to look for translations
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ i18ndc()

QString i18ndc ( const char *  domain,
const char *  context,
const char *  text,
const TYPE &  arg... 
)

Translate a string from domain with context and substitute any arguments.

Parameters
domaindomain in which to look for translations
contextcontext of the string
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ i18ndcp()

QString i18ndcp ( const char *  domain,
const char *  context,
const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a string from domain with context and plural and substitute any arguments.

Parameters
domaindomain in which to look for translations
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ i18ndp()

QString i18ndp ( const char *  domain,
const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a string from domain with plural and substitute any arguments.

Parameters
domaindomain in which to look for translations
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ i18np()

QString i18np ( const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a string with plural and substitute any arguments.

Parameters
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ ki18n()

KLocalizedString ki18n ( const char *  text)

Create non-finalized translated string.

Parameters
textstring to translate
Returns
non-finalized translated string

◆ ki18nc()

KLocalizedString ki18nc ( const char *  context,
const char *  text 
)

Create non-finalized translated string with context.

Parameters
contextcontext of the string
textstring to translate
Returns
non-finalized translated string

◆ ki18ncp()

KLocalizedString ki18ncp ( const char *  context,
const char *  singular,
const char *  plural 
)

Create non-finalized translated string with context and plural.

Parameters
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ ki18nd()

KLocalizedString ki18nd ( const char *  domain,
const char *  text 
)

Create non-finalized translated string from domain.

Parameters
domaindomain in which to look for translations
textstring to translate
Returns
non-finalized translated string

◆ ki18ndc()

KLocalizedString ki18ndc ( const char *  domain,
const char *  context,
const char *  text 
)

Create non-finalized translated string from domain with context.

Parameters
domaindomain in which to look for translations
contextcontext of the string
textstring to translate
Returns
non-finalized translated string

◆ ki18ndcp()

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.

Parameters
domaindomain in which to look for translations
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ ki18ndp()

KLocalizedString ki18ndp ( const char *  domain,
const char *  singular,
const char *  plural 
)

Create non-finalized translated string from domain with plural.

Parameters
domaindomain in which to look for translations
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ ki18np()

KLocalizedString ki18np ( const char *  singular,
const char *  plural 
)

Create non-finalized translated string with plural.

Parameters
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ kxi18n()

KLocalizedString kxi18n ( const char *  text)

Create non-finalized markup-aware translated string.

Parameters
textstring to translate
Returns
non-finalized translated string

◆ kxi18nc()

KLocalizedString kxi18nc ( const char *  context,
const char *  text 
)

Create non-finalized markup-aware translated string with context.

Parameters
contextcontext of the string
textstring to translate
Returns
non-finalized translated string

◆ kxi18ncp()

KLocalizedString kxi18ncp ( const char *  context,
const char *  singular,
const char *  plural 
)

Create non-finalized markup-aware translated string.

with context and plural.

Parameters
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ kxi18nd()

KLocalizedString kxi18nd ( const char *  domain,
const char *  text 
)

Create non-finalized markup-aware translated string from domain.

Parameters
domaindomain in which to look for translations
textstring to translate
Returns
non-finalized translated string

◆ kxi18ndc()

KLocalizedString kxi18ndc ( const char *  domain,
const char *  context,
const char *  text 
)

Create non-finalized markup-aware translated string from domain with context.

Parameters
domaindomain in which to look for translations
contextcontext of the string
textstring to translate
Returns
non-finalized translated string

◆ kxi18ndcp()

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.

Parameters
domaindomain in which to look for translations
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ kxi18ndp()

KLocalizedString kxi18ndp ( const char *  domain,
const char *  singular,
const char *  plural 
)

Create non-finalized markup-aware translated string from domain with plural.

Parameters
domaindomain in which to look for translations
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ kxi18np()

KLocalizedString kxi18np ( const char *  singular,
const char *  plural 
)

Create non-finalized markup-aware translated string with plural.

Parameters
singularsingular form of the string to translate
pluralplural form of the string to translate
Returns
non-finalized translated string

◆ tr2i18n()

QString tr2i18n ( const char *  text,
const char *  comment = nullptr 
)
inline

Redirect Qt's uic-generated translation calls to Ki18n.

Use -tr tr2i18n option to uic to have it redirect calls.

Parameters
textstring to translate
commentQt equivalent of disambiguation context
Returns
translated string

◆ tr2i18nd()

QString tr2i18nd ( const char *  domain,
const char *  text,
const char *  comment = nullptr 
)
inline

Like tr2i18n, but look for translation in a specific domain.

Use -tr tr2i18nd option to uic to have it redirect calls.

Parameters
domaindomain in which to look for translations
textstring to translate
commentQt equivalent of disambiguation context
Returns
translated string

◆ tr2xi18n()

QString tr2xi18n ( const char *  text,
const char *  comment = nullptr 
)
inline

Like tr2i18n, but when UI strings are KUIT markup-aware.

Use -tr tr2xi18n option to uic to have it redirect calls.

Parameters
textmarkup-aware string to translate
commentQt equivalent of disambiguation context
Returns
translated string

◆ tr2xi18nd()

QString tr2xi18nd ( const char *  domain,
const char *  text,
const char *  comment = nullptr 
)
inline

Like tr2xi18n, but look for translation in a specific domain.

Use -tr tr2xi18nd option to uic to have it redirect calls.

Parameters
domaindomain in which to look for translations
textmarkup-aware string to translate
commentQt equivalent of disambiguation context
Returns
translated string

◆ xi18n()

QString xi18n ( const char *  text,
const TYPE &  arg... 
)

Translate a markup-aware string and substitute any arguments.

Parameters
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ xi18nc()

QString xi18nc ( const char *  context,
const char *  text,
const TYPE &  arg... 
)

Translate a markup-aware string with context and substitute any arguments.

Parameters
contextcontext of the string
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ xi18ncp()

QString xi18ncp ( const char *  context,
const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a markup-aware string with context and plural and substitute any arguments.

Parameters
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ xi18nd()

QString xi18nd ( const char *  domain,
const char *  text,
const TYPE &  arg... 
)

Translate a markup-aware string from domain and substitute any arguments.

Parameters
domaindomain in which to look for translations
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ xi18ndc()

QString xi18ndc ( const char *  domain,
const char *  context,
const char *  text,
const TYPE &  arg... 
)

Translate a markup-aware string from domain with context and substitute any arguments.

Parameters
domaindomain in which to look for translations
contextcontext of the string
textstring to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ xi18ndcp()

QString xi18ndcp ( const char *  domain,
const char *  context,
const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a markup-aware string from domain with context and plural and substitute any arguments.

Parameters
domaindomain in which to look for translations
contextcontext of the string
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ xi18ndp()

QString xi18ndp ( const char *  domain,
const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a markup-aware string from domain with plural and substitute any arguments.

Parameters
domaindomain in which to look for translations
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string

◆ xi18np()

QString xi18np ( const char *  singular,
const char *  plural,
const TYPE &  arg... 
)

Translate a markup-aware string with plural and substitute any arguments.

Parameters
singularsingular form of the string to translate
pluralplural form of the string to translate
argarguments to insert (0 to 9), admissible types according to KLocalizedString::subs methods
Returns
translated string