# class KCatalog

###

Table of contents
Modules
kdecore Classes
All Classes

Module | kdecore
Namespace | global
Class | KCatalog
Inherits |

This class abstracts a gettext message catalog. It will take care of needed gettext bindings.

See also KLocale

### methods

- KCatalog (name, language)

  returns a KCatalog object

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  language | QString |

  Constructor.

  name - The name of the catalog

  language - The language of this catalog

- KCatalog (rhs)

  returns a KCatalog object

  Argument | Type | Default
  --- | --- | ---
  rhs | KCatalog |

  Copy constructor.

- catalogLocaleDir (name, language)

  returns (QString)
  static

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  language | QString |

  Finds the locale directory for the given catalog in given language.

  name - The name of the catalog

  language - The language of this catalog

  Returns The locale directory if found, QString() otherwise.

- language ()

  returns (QString)

  Returns the language of the catalog.

  Returns The language of the catalog

- localeDir ()

  returns (QString)

  Returns locale directory of the catalog.

  Returns The locale directory of the catalog.

- name ()

  returns (QString)

  Returns the name of the catalog.

  Returns The name of the catalog

- translate (msgid)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgid | char |

  Retrieves a translation of the specified message id.

  Do not pass 0 or "" strings as message id.

  msgid - The message id

  Returns The translated message, or msgid if not found

- translate (msgctxt, msgid)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgctxt | char |
  msgid | char |

  Retrieves a translation of the specified message id with given context.

  Do not pass 0 or "" strings as message id or context.

  msgctxt - The context

  msgid - The message id

  Returns The translated message, or msgid if not found

- translate (msgid, msgid_plural, n)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgid | char |
  msgid_plural | char |
  n | ulong |

  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.

  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

- translate (msgctxt, msgid, msgid_plural, n)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgctxt | char |
  msgid | char |
  msgid_plural | char |
  n | ulong |

  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.

  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

- translateStrict (msgid)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgid | char |

  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.

  msgid - The message id

  Returns The translated message, or QString() if not found

- translateStrict (msgctxt, msgid)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgctxt | char |
  msgid | char |

  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.

  msgctxt - The context

  msgid - The message id

  Returns The translated message, or QString() if not found

- translateStrict (msgid, msgid_plural, n)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgid | char |
  msgid_plural | char |
  n | ulong |

  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.

  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

- translateStrict (msgctxt, msgid, msgid_plural, n)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  msgctxt | char |
  msgid | char |
  msgid_plural | char |
  n | ulong |

  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.

  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