dbp::i18n Class Reference

Internationalization helper class. More...

#include <i18n.h>

List of all members.

Static Public Member Functions

static void register_catalog (const std::string &catalog)
 Load the translation catalog.
static void register_catalog_at (const std::string &catalog, const std::string &path)
 Load the translation catalog at the specified directory.
static std::string translate (const std::string &catalog, const std::string &str)
 Translate the given english string to the current locale language.

Detailed Description

Internationalization helper class.

This class is a wrapper around GNU gettext subsystem that provides internationalization features to your application.

Use the shortcut _("string") to avoid use this class directly.


Member Function Documentation

static void dbp::i18n::register_catalog ( const std::string &  catalog  )  [static]

Load the translation catalog.

Parameters:
catalog the name of the resources catalog (your application name).
static void dbp::i18n::register_catalog_at ( const std::string &  catalog,
const std::string &  path 
) [static]

Load the translation catalog at the specified directory.

Parameters:
catalog the name of the resources catalog (your application name).
path the path to the catalog directory.
static std::string dbp::i18n::translate ( const std::string &  catalog,
const std::string &  str 
) [static]

Translate the given english string to the current locale language.

Parameters:
catalog the name of the resources catalog (your application name).
str the string to translate.
Returns:
the translated string.

The documentation for this class was generated from the following file:

 
Support This Project
SourceForge.net Logo