KDECore
#include <kcatalog_p.h>
Public Member Functions | |
KCatalog (const QString &name, const QString &language) | |
KCatalog (const KCatalog &rhs) | |
virtual | ~KCatalog () |
QString | language () const |
QString | localeDir () const |
QString | name () const |
KCatalog & | operator= (const KCatalog &rhs) |
QString | translate (const char *msgid) const |
QString | translate (const char *msgctxt, const char *msgid) const |
QString | translate (const char *msgid, const char *msgid_plural, unsigned long n) const |
QString | translate (const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long n) const |
QString | translateStrict (const char *msgid) const |
QString | translateStrict (const char *msgctxt, const char *msgid) const |
QString | translateStrict (const char *msgid, const char *msgid_plural, unsigned long n) const |
QString | translateStrict (const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long n) const |
Static Public Member Functions | |
static QString | catalogLocaleDir (const QString &name, const QString &language) |
Friends | |
QDebug | operator<< (QDebug debug, const KCatalog &c) |
Detailed Description
This class abstracts a gettext message catalog.
It will take care of needed gettext bindings.
- See also
- KLocale
Definition at line 35 of file kcatalog_p.h.
Constructor & Destructor Documentation
Constructor.
- Parameters
-
name The name of the catalog language The language of this catalog
Definition at line 100 of file kcatalog.cpp.
KCatalog::KCatalog | ( | const KCatalog & | rhs | ) |
Copy constructor.
Definition at line 131 of file kcatalog.cpp.
|
virtual |
Destructor.
Definition at line 144 of file kcatalog.cpp.
Member Function Documentation
Finds the locale directory for the given catalog in given language.
- Parameters
-
name The name of the catalog language The language of this catalog
- Returns
- The locale directory if found, QString() otherwise.
Definition at line 149 of file kcatalog.cpp.
QString KCatalog::language | ( | ) | const |
Returns the language of the catalog.
- Returns
- The language of the catalog
Definition at line 162 of file kcatalog.cpp.
QString KCatalog::localeDir | ( | ) | const |
Returns locale directory of the catalog.
- Returns
- The locale directory of the catalog.
Definition at line 167 of file kcatalog.cpp.
QString KCatalog::name | ( | ) | const |
Returns the name of the catalog.
- Returns
- The name of the catalog
Definition at line 157 of file kcatalog.cpp.
Assignment operator.
Definition at line 137 of file kcatalog.cpp.
QString KCatalog::translate | ( | const char * | msgid | ) | const |
Retrieves a translation of the specified message id.
Do not pass 0 or "" strings as message id.
- Parameters
-
msgid The message id
- Returns
- The translated message, or
msgid
if not found
Definition at line 212 of file kcatalog.cpp.
QString KCatalog::translate | ( | const char * | msgctxt, |
const char * | msgid | ||
) | const |
Retrieves a translation of the specified message id with given context.
Do not pass 0 or "" strings as message id or context.
- Parameters
-
msgctxt The context msgid The message id
- Returns
- The translated message, or
msgid
if not found
Definition at line 221 of file kcatalog.cpp.
QString KCatalog::translate | ( | const char * | msgid, |
const char * | msgid_plural, | ||
unsigned long | n | ||
) | const |
Retrieves a proper plural form of translation for the specified English singular and plural message ids.
Do not pass 0 or "" strings as message ids.
- Parameters
-
msgid The singular message id msgid_plural The plural message id n The number to which the plural form applies
- Returns
- The translated message, or proper English form if not found
Definition at line 230 of file kcatalog.cpp.
QString KCatalog::translate | ( | const char * | msgctxt, |
const char * | msgid, | ||
const char * | msgid_plural, | ||
unsigned long | n | ||
) | const |
Retrieves a proper plural form of translation for the specified English singular and plural message ids, with given context.
Do not pass 0 or "" strings as message ids or context.
- Parameters
-
msgctxt The context msgid The singular message id msgid_plural The plural message id n The number to which the plural form applies
- Returns
- The translated message, or proper English form if not found
Definition at line 240 of file kcatalog.cpp.
QString KCatalog::translateStrict | ( | const char * | msgid | ) | const |
Retrieves a translation of the specified message id, returning empty if the translation was not found.
Do not pass 0 or "" strings as message id.
- Parameters
-
msgid The message id
- Returns
- The translated message, or QString() if not found
Definition at line 250 of file kcatalog.cpp.
QString KCatalog::translateStrict | ( | const char * | msgctxt, |
const char * | msgid | ||
) | const |
Retrieves a translation of the specified message id with given context, returning empty if the translation was not found.
Do not pass 0 or "" strings as message id or context.
- Parameters
-
msgctxt The context msgid The message id
- Returns
- The translated message, or QString() if not found
Definition at line 259 of file kcatalog.cpp.
QString KCatalog::translateStrict | ( | const char * | msgid, |
const char * | msgid_plural, | ||
unsigned long | n | ||
) | const |
Retrieves a proper plural form of translation for the specified English singular and plural message ids, returning empty if the translation was not found.
Do not pass 0 or "" strings as message ids.
- Parameters
-
msgid The singular message id msgid_plural The plural message id n The number to which the plural form applies
- Returns
- The translated message, or QString() if not found
Definition at line 268 of file kcatalog.cpp.
QString KCatalog::translateStrict | ( | const char * | msgctxt, |
const char * | msgid, | ||
const char * | msgid_plural, | ||
unsigned long | n | ||
) | const |
Retrieves a proper plural form of translation for the specified English singular and plural message ids, with given context, returning empty if the translation was not found.
Do not pass 0 or "" strings as message ids or context.
- Parameters
-
msgctxt The context msgid The singular message id msgid_plural The plural message id n The number to which the plural form applies
- Returns
- The translated message, or QString() if not found
Definition at line 278 of file kcatalog.cpp.
Friends And Related Function Documentation
|
friend |
Definition at line 93 of file kcatalog.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.