Namespaces | Functions | Variables

i18n.cpp File Reference

#include "i18n.h"
#include "common/wave_ex.h"
#include "datahash/datahash_text.h"
#include "datahash/datahash_util.h"
#include "perf/perf.h"
#include "resources/resources-internal.h"
#include "util/parsing.h"
#include "util/string-buffer.h"
Include dependency graph for i18n.cpp:

Go to the source code of this file.

Namespaces

namespace  i18n

Functions

void registerWaveResource_i18n_country_codes_txt (void) throw ()
void registerWaveResource_i18n_language_codes_txt (void) throw ()
static void i18n::loadTable (IO two_character_map_t &table, IN char base, IN const char *name)
static void i18n::loadTables (void) throw ()
void i18n::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 i18n::isValidCountryCode (IN const char *country_code)
 is this a valid country code? Based on ISO 3166
bool i18n::isValidLanguageCode (IN const char *language_code)
 is this a valid language code? Only supports ISO 639-1 (2-character codes) for now.
bool i18n::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 * i18n::getString (IN const Manager *mgr, IN const char *id)
 returns the string from the given Manager.
const char * i18n::getHostLocale (void)
 attempt to determine the local host locale. Can return NULL!

Variables

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

Function Documentation

void registerWaveResource_i18n_country_codes_txt ( void   )  throw ()
void registerWaveResource_i18n_language_codes_txt ( void   )  throw ()