Classes | Namespaces | Functions

i18n.h File Reference

#include "nstream/nstream.h"
Include dependency graph for i18n.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


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


namespace  i18n


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!