Internationalization helper class. More...
#include <i18n.h>
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. | |
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.
| static void dbp::i18n::register_catalog | ( | const std::string & | catalog | ) | [static] |
Load the translation catalog.
| 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.
| 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.
| catalog | the name of the resources catalog (your application name). | |
| str | the string to translate. |