Implement taking date strings from messages locale.

* mimic LocaleKit and add option to POSIX locale backend for taking
  the date strings from the messages locale (instead of time locale)
This commit is contained in:
Oliver Tappe
2012-02-23 23:15:36 +01:00
parent 93efe98ec2
commit 1e1278f46f
4 changed files with 36 additions and 15 deletions
@@ -31,6 +31,8 @@ public:
const char* PosixLocaleName()
{ return fPosixLocaleName; }
const Locale& ICULocale() const;
protected:
status_t _ConvertUnicodeStringToLocaleconvEntry(
const UnicodeString& string,
@@ -52,6 +54,14 @@ private:
};
inline
const Locale&
ICUCategoryData::ICULocale() const
{
return fLocale;
}
} // namespace Libroot
} // namespace BPrivate
+7 -3
View File
@@ -18,11 +18,15 @@ namespace BPrivate {
namespace Libroot {
class ICUMessagesData;
class ICUTimeData : public ICUCategoryData {
typedef ICUCategoryData inherited;
public:
ICUTimeData(pthread_key_t tlsKey,
struct lc_time_t& lcTimeInfo);
struct lc_time_t& lcTimeInfo,
const ICUMessagesData& messagesData);
~ICUTimeData();
void Initialize(LocaleTimeDataBridge* dataBridge);
@@ -33,8 +37,6 @@ public:
const char* GetLanginfo(int index);
const Locale& ICULocale() const;
private:
status_t _SetLCTimeEntries(const UnicodeString* strings,
char* destination, int entrySize,
@@ -59,6 +61,8 @@ private:
struct lc_time_t& fLCTimeInfo;
LocaleTimeDataBridge* fDataBridge;
const ICUMessagesData& fMessagesData;
};