OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::Language Struct Reference

#include <opentrep/Language.hpp>

Public Types

enum  EN_Language {
  lg_com = 0, ar, ar_DZ, ar_MA,
  ar_SA, ar_TN, de, de_DE,
  en, en_GB, en_US, es,
  es_AR, es_ES, es_MX, fa,
  fa_IR, fr, fr_BE, fr_CA,
  fr_CH, fr_FR, he, he_IL,
  ko, ko_KR, pl, pl_PL,
  pt, pt_BR, pt_PT, sv,
  sv_SE, ru, ru_RU, uk,
  uk_UA, zh, zh_CN, zh_HK,
  zh_TW, LAST_VALUE
}
 

Static Public Member Functions

static const std::string & getLongLabel (const EN_Language &)
 
static const std::string & getShortLabel (const EN_Language &)
 
static EN_Language getCode (const std::string &)
 

Detailed Description

Enumeration of languages.

On Unix, see also the /usr/share/locale/ directory. The iso-codes (RPM, DEB) package provides all the ISO-related code information.

Definition at line 18 of file Language.hpp.

Member Enumeration Documentation

The standard language form, i.e., the one without the country code, must be placed at the beginning of the list of the corresponding language variations. For instance, "en" must be placed before "en_GB" or "en_US".

Enumerator
lg_com 
ar 
ar_DZ 
ar_MA 
ar_SA 
ar_TN 
de 
de_DE 
en 
en_GB 
en_US 
es 
es_AR 
es_ES 
es_MX 
fa 
fa_IR 
fr 
fr_BE 
fr_CA 
fr_CH 
fr_FR 
he 
he_IL 
ko 
ko_KR 
pl 
pl_PL 
pt 
pt_BR 
pt_PT 
sv 
sv_SE 
ru 
ru_RU 
uk 
uk_UA 
zh 
zh_CN 
zh_HK 
zh_TW 
LAST_VALUE 

Definition at line 25 of file Language.hpp.

Member Function Documentation

const std::string & OPENTREP::Language::getLongLabel ( const EN_Language iLanguage)
static

Get the long label (language and localisation) as a string.

Definition at line 37 of file Language.cpp.

const std::string & OPENTREP::Language::getShortLabel ( const EN_Language iLanguage)
static

Get the short label (just the language code) as a string.

Definition at line 43 of file Language.cpp.

Referenced by getCode().

Language::EN_Language OPENTREP::Language::getCode ( const std::string &  iLanguageString)
static

Get the language code corresponding to the label (language).

Definition at line 48 of file Language.cpp.

References getShortLabel(), LAST_VALUE, and lg_com.


The documentation for this struct was generated from the following files: