haiku/headers/os/locale/Language.h
Oliver Tappe 723383c0f4 Applied patch by PulkoMandy, adjusted and extended by myself:
* integrating most of the locale kit into the build (and image)
* removed LocaleBuild.h and _IMPEXP_LOCALE since that does not make
  sense for elf (which usually exports all symbols anyway)
* added a couple of locale kit related pseudo targets for convenience
Hey, some of that stuff already seems to work :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 21:56:16 +00:00

43 lines
860 B
C++

#ifndef _LANGUAGE_H_
#define _LANGUAGE_H_
#include <SupportDefs.h>
#include <LocaleStrings.h>
enum script_direction {
B_LEFT_TO_RIGHT = 0,
B_RIGHT_TO_LEFT,
B_TOP_TO_BOTTOM, // seems not to be supported anywhere else?
};
class BLanguage {
public:
~BLanguage();
// language name, e.g. "english", "deutsch"
const char *Name() const { return fName; }
// ISO-639 language code, e.g. "en", "de"
const char *Code() const { return fCode; }
// ISO-639 language family, e.g. "germanic"
const char *Family() const { return fFamily; }
uint8 Direction() const;
// see definitions below
const char *GetString(uint32 id) const;
private:
friend class BLocaleRoster;
BLanguage(const char *language);
void Default();
char *fName, *fCode, *fFamily, *fStrings[B_NUM_LANGUAGE_STRINGS];
uint8 fDirection;
};
#endif /* _LANGUAGE_H_ */