mirror of
https://review.haiku-os.org/haiku
synced 2025-02-02 19:57:42 +01:00
5570fd11c0
- Some changes in the locale roster to allow instanciating a language - Locale preflet : use this new API instead of directly calling ICU Side effect : all languages in Locale window are now displayed in the current locale. It makes more sense as otherwise the list would be unsortable. However it can get annoying if you mistakenly set a strange language as default. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35210 a95241bf-73f2-0310-859d-f6bbb57e9c96
56 lines
979 B
C++
56 lines
979 B
C++
/*
|
|
** Copyright 2003, Haiku, Inc.
|
|
** Distributed under the terms of the MIT License.
|
|
*/
|
|
|
|
|
|
#ifndef _LANGUAGE_H_
|
|
#define _LANGUAGE_H_
|
|
|
|
|
|
#include <String.h>
|
|
#include <SupportDefs.h>
|
|
#include <LocaleStrings.h>
|
|
|
|
|
|
// We must not include the icu headers in there as it could mess up binary
|
|
// compatibility.
|
|
namespace icu_4_2 {
|
|
class Locale;
|
|
}
|
|
|
|
|
|
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"
|
|
status_t GetName(BString* name);
|
|
// ISO-639 language code, e.g. "en", "de"
|
|
const char* Code();
|
|
|
|
uint8 Direction() const;
|
|
|
|
// see definitions below
|
|
const char *GetString(uint32 id) const;
|
|
|
|
private:
|
|
friend class BLocaleRoster;
|
|
|
|
BLanguage(const char *language);
|
|
void Default();
|
|
|
|
char *fStrings[B_NUM_LANGUAGE_STRINGS];
|
|
uint8 fDirection;
|
|
icu_4_2::Locale* fICULocale;
|
|
};
|
|
|
|
#endif /* _LANGUAGE_H_ */
|