d1d8fda637
* BLocale now keeps language and country completely separate and mixes the formatting conventions into the current language's locale when formatting dates and times (needs to be done for number- and currency-formatting, too, since the digits may not be in the preferred language) * optimized fetching of the flag icons such that they are all loaded in one go (by the locale roster) - this alone speeds up the Locale preflet considerably * worked on fixing the language confusion in the Locale preflet * fixed a couple of bugs in the Locale preflet that would lead to illegal characters being displayed in the date-subpart menus git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39013 a95241bf-73f2-0310-859d-f6bbb57e9c96
65 lines
1.1 KiB
C++
65 lines
1.1 KiB
C++
/*
|
|
* Copyright 2003-2010, Haiku, Inc.
|
|
* Distributed under the terms of the MIT Licence.
|
|
*/
|
|
#ifndef _COUNTRY_H_
|
|
#define _COUNTRY_H_
|
|
|
|
|
|
#include <List.h>
|
|
#include <LocaleStrings.h>
|
|
#include <String.h>
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
class BBitmap;
|
|
class BLanguage;
|
|
class BMessage;
|
|
|
|
namespace icu_44 {
|
|
class DateFormat;
|
|
class Locale;
|
|
}
|
|
|
|
|
|
enum {
|
|
B_METRIC = 0,
|
|
B_US
|
|
};
|
|
|
|
|
|
class BCountry {
|
|
public:
|
|
BCountry(const char* languageCode,
|
|
const char* countryCode);
|
|
BCountry(const char* languageAndCountryCode
|
|
= "en_US");
|
|
BCountry(const BCountry& other);
|
|
BCountry& operator=(const BCountry& other);
|
|
~BCountry();
|
|
|
|
status_t GetNativeName(BString& name) const;
|
|
status_t GetName(BString& name,
|
|
const BLanguage* displayLanguage = NULL
|
|
) const;
|
|
|
|
const char* Code() const;
|
|
status_t GetIcon(BBitmap* result) const;
|
|
|
|
const char* GetLocalizedString(uint32 id) const;
|
|
|
|
status_t GetAvailableTimeZones(
|
|
BMessage* timeZones) const;
|
|
|
|
int8 Measurement() const;
|
|
|
|
class Private;
|
|
private:
|
|
friend class Private;
|
|
|
|
icu_44::Locale* fICULocale;
|
|
};
|
|
|
|
|
|
#endif /* _COUNTRY_H_ */
|