• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

klocalizedstring.h File Reference


Detailed Description

Definition in file klocalizedstring.h.

#include <kdecore_export.h>
#include <QtCore/QChar>
#include <QtCore/QLatin1Char>
#include <QtCore/QStringList>

Include dependency graph for klocalizedstring.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Classes

class  I18nTypeCheck< T, s >
class  I18nTypeCheck< char[s], s >
class  KLocalizedString
 Class for producing and handling localized messages. More...

Defines

#define I18N_ERR_MSG   String_literal_as_second_argument_to_i18n___Perhaps_you_need_i18nc_or_i18np
#define I18N_NOOP(x)   x
#define I18N_NOOP2(comment, x)   x
#define STATIC_ASSERT_NOT_LITERAL_STRING(T)   I18nTypeCheck<T, sizeof(T)>::I18N_ERR_MSG ();

Functions

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
template<typename A1, typename A2, typename A3, typename A4>
QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
template<typename A1, typename A2, typename A3>
QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
template<typename A1, typename A2>
QString i18n (const char *text, const A1 &a1, const A2 &a2)
template<typename A1>
QString i18n (const char *text, const A1 &a1)
QString i18n (const char *text)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
template<typename A1, typename A2, typename A3, typename A4>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
template<typename A1, typename A2, typename A3>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
template<typename A1, typename A2>
QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2)
template<typename A1>
QString i18nc (const char *ctxt, const char *text, const A1 &a1)
QString i18nc (const char *ctxt, const char *text)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
template<typename A1, typename A2, typename A3, typename A4>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
template<typename A1, typename A2, typename A3>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3)
template<typename A1, typename A2>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2)
template<typename A1>
QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
template<typename A1, typename A2, typename A3, typename A4>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
template<typename A1, typename A2, typename A3>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3)
template<typename A1, typename A2>
QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2)
template<typename A1>
QString i18np (const char *sing, const char *plur, const A1 &a1)
KLocalizedString ki18n (const char *msg)
KLocalizedString ki18nc (const char *ctxt, const char *msg)
KLocalizedString ki18ncp (const char *ctxt, const char *singular, const char *plural)
KLocalizedString ki18np (const char *singular, const char *plural)
QString tr2i18n (const char *message, const char *comment=0)

Define Documentation

#define I18N_ERR_MSG   String_literal_as_second_argument_to_i18n___Perhaps_you_need_i18nc_or_i18np

Definition at line 551 of file klocalizedstring.h.

#define I18N_NOOP ( x   )     x

I18N_NOOP marks a string to be translated without translating it.

Do not use this unless you know you need it. http://developer.kde.org/documentation/other/developer-faq.html#q2.11.2

Example usage where say_something() returns either "hello" or "goodbye":

   (void) I18N_NOOP("hello");
   (void) I18N_NOOP("goodbye");
   ...
   mystring = i18n(say_something());

Definition at line 51 of file klocalizedstring.h.

#define I18N_NOOP2 ( comment,
x   )     x

If the string is too ambiguous to be translated well to a non-english language, use this instead of I18N_NOOP to separate lookup string and english.

Example usage where say_something() returns either "hello" or "goodbye":

   (void) I18N_NOOP2("greeting", "hello");
   (void) I18N_NOOP2("greeting", "goodbye");
   ...
   mystring = i18nc("greeting", say_something());
Warning:
You need to call i18nc(context, stringVar) later on, not just i18n(stringVar).

Definition at line 70 of file klocalizedstring.h.

#define STATIC_ASSERT_NOT_LITERAL_STRING ( T   )     I18nTypeCheck<T, sizeof(T)>::I18N_ERR_MSG ();

Definition at line 554 of file klocalizedstring.h.


Function Documentation

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8,
const A9 &  a9 
) [inline]

Returns a localized version of a string with 9 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
a9 ninth argument
Returns:
localized string

Definition at line 717 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8 
) [inline]

Returns a localized version of a string with 8 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
Returns:
localized string

Definition at line 696 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7 
) [inline]

Returns a localized version of a string with 7 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
Returns:
localized string

Definition at line 676 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6 
) [inline]

Returns a localized version of a string with 6 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
Returns:
localized string

Definition at line 657 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5 
) [inline]

Returns a localized version of a string with 5 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
Returns:
localized string

Definition at line 639 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) [inline]

Returns a localized version of a string with 4 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
Returns:
localized string

Definition at line 622 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) [inline]

Returns a localized version of a string with 3 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
a3 third argument
Returns:
localized string

Definition at line 606 of file klocalizedstring.h.

template<typename A1, typename A2>
QString i18n ( const char *  text,
const A1 &  a1,
const A2 &  a2 
) [inline]

Returns a localized version of a string with 2 arguments.

Parameters:
text string to be localized
a1 first argument
a2 second argument
Returns:
localized string

Definition at line 591 of file klocalizedstring.h.

template<typename A1>
QString i18n ( const char *  text,
const A1 &  a1 
) [inline]

Returns a localized version of a string with 1 argument.

Parameters:
text string to be localized
a1 first argument
Returns:
localized string

Definition at line 577 of file klocalizedstring.h.

QString i18n ( const char *  text  )  [inline]

Returns a localized version of a string.

Parameters:
text string to be localized
Returns:
localized string

Definition at line 565 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8,
const A9 &  a9 
) [inline]

Returns a localized version of a string with 9 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
a9 ninth argument
Returns:
localized string

Definition at line 885 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8 
) [inline]

Returns a localized version of a string with 8 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
Returns:
localized string

Definition at line 864 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7 
) [inline]

Returns a localized version of a string with 7 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
Returns:
localized string

Definition at line 844 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6 
) [inline]

Returns a localized version of a string with 6 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
Returns:
localized string

Definition at line 825 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5 
) [inline]

Returns a localized version of a string with 5 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
Returns:
localized string

Definition at line 807 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) [inline]

Returns a localized version of a string with 4 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
Returns:
localized string

Definition at line 790 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) [inline]

Returns a localized version of a string with 3 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
a3 third argument
Returns:
localized string

Definition at line 774 of file klocalizedstring.h.

template<typename A1, typename A2>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1,
const A2 &  a2 
) [inline]

Returns a localized version of a string with 2 arguments and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
a2 second argument
Returns:
localized string

Definition at line 759 of file klocalizedstring.h.

template<typename A1>
QString i18nc ( const char *  ctxt,
const char *  text,
const A1 &  a1 
) [inline]

Returns a localized version of a string with 1 argument and a context.

Parameters:
ctxt context of the string
text string to be localized
a1 first argument
Returns:
localized string

Definition at line 745 of file klocalizedstring.h.

QString i18nc ( const char *  ctxt,
const char *  text 
) [inline]

Returns a localized version of a string and a context.

Parameters:
ctxt context of the string
text string to be localized
Returns:
localized string

Definition at line 732 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8,
const A9 &  a9 
) [inline]

Returns a localized version of a string with 9 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
a9 ninth argument
Returns:
localized string

Definition at line 1206 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8 
) [inline]

Returns a localized version of a string with 8 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
Returns:
localized string

Definition at line 1184 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7 
) [inline]

Returns a localized version of a string with 7 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
Returns:
localized string

Definition at line 1163 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6 
) [inline]

Returns a localized version of a string with 6 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
Returns:
localized string

Definition at line 1143 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5 
) [inline]

Returns a localized version of a string with 5 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
Returns:
localized string

Definition at line 1124 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) [inline]

Returns a localized version of a string with 4 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
Returns:
localized string

Definition at line 1106 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) [inline]

Returns a localized version of a string with 3 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
Returns:
localized string

Definition at line 1089 of file klocalizedstring.h.

template<typename A1, typename A2>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2 
) [inline]

Returns a localized version of a string with 2 arguments and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
Returns:
localized string

Definition at line 1073 of file klocalizedstring.h.

template<typename A1>
QString i18ncp ( const char *  ctxt,
const char *  sing,
const char *  plur,
const A1 &  a1 
) [inline]

Returns a localized version of a string with 1 argument and a context using correct plural form.

Parameters:
ctxt context of the string
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
Returns:
localized string

Definition at line 1058 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8,
const A9 &  a9 
) [inline]

Returns a localized version of a string with 9 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
a9 ninth argument
Returns:
localized string

Definition at line 1041 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8 
) [inline]

Returns a localized version of a string with 8 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
a8 eighth argument
Returns:
localized string

Definition at line 1020 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7 
) [inline]

Returns a localized version of a string with 7 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
a7 seventh argument
Returns:
localized string

Definition at line 1000 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6 
) [inline]

Returns a localized version of a string with 6 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
a6 sixth argument
Returns:
localized string

Definition at line 981 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4, typename A5>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5 
) [inline]

Returns a localized version of a string with 5 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
a5 fifth argument
Returns:
localized string

Definition at line 963 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3, typename A4>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) [inline]

Returns a localized version of a string with 4 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
a4 fourth argument
Returns:
localized string

Definition at line 946 of file klocalizedstring.h.

template<typename A1, typename A2, typename A3>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) [inline]

Returns a localized version of a string with 3 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
a3 third argument
Returns:
localized string

Definition at line 930 of file klocalizedstring.h.

template<typename A1, typename A2>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1,
const A2 &  a2 
) [inline]

Returns a localized version of a string with 2 arguments using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
a2 second argument
Returns:
localized string

Definition at line 915 of file klocalizedstring.h.

template<typename A1>
QString i18np ( const char *  sing,
const char *  plur,
const A1 &  a1 
) [inline]

Returns a localized version of a string with 1 argument using correct plural form.

Parameters:
sing string to be localized in singular
plur string to be localized in plural
a1 first argument
Returns:
localized string

Definition at line 901 of file klocalizedstring.h.

KLocalizedString ki18n ( const char *  msg  ) 

Creates localized string from a given message.

Normaly you should use i18n() templates instead, as you need real KLocalizedString object only in special cases. All text arguments must be UTF-8 encoded and must not be empty or NULL.

Parameters:
msg message text
Returns:
created KLocalizedString

Definition at line 902 of file klocalizedstring.cpp.

KLocalizedString ki18nc ( const char *  ctxt,
const char *  msg 
)

Creates localized string from a given message, with added context.

Context is only for disambiguation purposes (both for lookup and for translators), it is not part of the message. Normaly you should use i18nc() templates instead, as you need real KLocalizedString object only in special cases. All text arguments must be UTF-8 encoded and must not be empty or NULL.

Parameters:
ctxt context text
msg message text
Returns:
created KLocalizedString

Definition at line 907 of file klocalizedstring.cpp.

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

Creates localized string from a given plural and singular form, with added context.

Context is only for disambiguation purposes (both for lookup and for translators), it is not part of the message. Normaly you should use i18ncp() templates instead, as you need real KLocalizedString object only in special cases. All text arguments must be UTF-8 encoded and must not be empty or NULL.

Parameters:
ctxt context text
singular message text in singular
plural message text in plural
Returns:
created KLocalizedString

Definition at line 917 of file klocalizedstring.cpp.

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

Creates localized string from a given plural and singular form.

Normaly you should use i18np() templates instead, as you need real KLocalizedString object only in special cases. All text arguments must be UTF-8 encoded and must not be empty or NULL.

Parameters:
singular message text in singular
plural message text in plural
Returns:
created KLocalizedString

Definition at line 912 of file klocalizedstring.cpp.

QString tr2i18n ( const char *  message,
const char *  comment = 0 
) [inline]

Qt's uic generated translation calls go through numerous indirections unnecessary in our case.

So we use uic -tr tr2i18n to redirect them to our i18n API.

Definition at line 538 of file klocalizedstring.h.

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal