Classes | Functions | Variables

i18n Namespace Reference

Classes

struct  locale_t
 simple struct for managing a locale specification More...
class  Manager

Functions

static void loadTable (IO two_character_map_t &table, IN char base, IN const char *name)
static void loadTables (void) throw ()
void getLocaleFromString (IN const char *localeString, OUT locale_t &locale)
 given a locale string, of the form "xx_yy.zzzz", returns a locale_t

  • xx: 2 character language code (ISO 639-1)
  • yy: 2 character country code (ISO 3166)
  • zzzz: encoding (arbitrary length, only "UTF-8" is supported right now)

bool isValidCountryCode (IN const char *country_code)
 is this a valid country code? Based on ISO 3166
bool isValidLanguageCode (IN const char *language_code)
 is this a valid language code? Only supports ISO 639-1 (2-character codes) for now.
bool isValidEncoding (IN const char *encoding)
 is this a valid encoding? "valid" means "supported by this library", which for right now is just "UTF-8"
const char * getString (IN const Manager *mgr, IN const char *id)
 returns the string from the given Manager.
const char * getHostLocale (void)
 attempt to determine the local host locale. Can return NULL!

Variables

static two_character_map_t s_countryCodes
static two_character_map_t s_languageCodes
static const char * s_resourceNamespace = "i18n"

Function Documentation

static void i18n::loadTable ( IO two_character_map_t &  table,
IN char  base,
IN const char *  name 
) [static]

Definition at line 117 of file i18n.cpp.

static void i18n::loadTables ( void   )  throw () [static]

Definition at line 168 of file i18n.cpp.


Variable Documentation

two_character_map_t i18n::s_countryCodes [static]

Definition at line 103 of file i18n.cpp.

two_character_map_t i18n::s_languageCodes [static]

Definition at line 104 of file i18n.cpp.

const char* i18n::s_resourceNamespace = "i18n" [static]

Definition at line 106 of file i18n.cpp.