1 #ifndef _LANGUAGE_H_ 2 #define _LANGUAGE_H_ 3 4 5 #include <SupportDefs.h> 6 #include <LocaleStrings.h> 7 8 9 enum script_direction { 10 B_LEFT_TO_RIGHT = 0, 11 B_RIGHT_TO_LEFT, 12 B_TOP_TO_BOTTOM, // seems not to be supported anywhere else? 13 }; 14 15 16 class BLanguage { 17 public: 18 ~BLanguage(); 19 20 // language name, e.g. "english", "deutsch" 21 const char *Name() const { return fName; } 22 // ISO-639 language code, e.g. "en", "de" 23 const char *Code() const { return fCode; } 24 // ISO-639 language family, e.g. "germanic" 25 const char *Family() const { return fFamily; } 26 27 uint8 Direction() const; 28 29 // see definitions below 30 const char *GetString(uint32 id) const; 31 32 private: 33 friend class BLocaleRoster; 34 35 BLanguage(const char *language); 36 void Default(); 37 38 char *fName, *fCode, *fFamily, *fStrings[B_NUM_LANGUAGE_STRINGS]; 39 uint8 fDirection; 40 }; 41 42 #endif /* _LANGUAGE_H_ */ 43