diff --git a/src/kits/locale/Language.cpp b/src/kits/locale/Language.cpp index fec69317f4..5603d59c25 100644 --- a/src/kits/locale/Language.cpp +++ b/src/kits/locale/Language.cpp @@ -8,6 +8,9 @@ #include +#include +#include +#include #include #include #include @@ -133,10 +136,16 @@ BLanguage::GetString(uint32 id) const status_t BLanguage::GetName(BString* name) { - // TODO: This will return the language not in the current be_app_catalog, - // but in the current system wide language! Don't know the exact reason. + BMessage preferredLanguage; + be_locale_roster->GetPreferredLanguages(&preferredLanguage); + BString appLanguage; + + preferredLanguage.FindString("language", 0, &appLanguage); + + printf("lang : %s\n",appLanguage.String()); + UnicodeString s; - fICULocale->getDisplayName(s); + fICULocale->getDisplayName(Locale(appLanguage), s); BStringByteSink converter(name); s.toUTF8(converter); return B_OK; diff --git a/src/kits/locale/LocaleRoster.cpp b/src/kits/locale/LocaleRoster.cpp index 2de9e2274f..b332692d33 100644 --- a/src/kits/locale/LocaleRoster.cpp +++ b/src/kits/locale/LocaleRoster.cpp @@ -182,10 +182,8 @@ RosterData::RosterData() BAutolock lock(fLock); assert(lock.IsLocked()); - // TODO: make a decision about log-facility and -options openlog_team("liblocale.so", LOG_PID, LOG_USER); #ifndef DEBUG - // TODO: find out why the following bugger isn't working! setlogmask_team(LOG_UPTO(LOG_WARNING)); #endif @@ -650,9 +648,9 @@ BLocaleRoster::LoadCatalog(const char *signature, const char *language, // other languages. // The current implementation uses the filename in order to // detect dependencies (parenthood) between languages (it - // traverses from "english-british-oxford" to "english-british" + // traverses from "english_british_oxford" to "english_british" // to "english"): - // TODO :use ICU facilities instead, so we can handle more + // TODO: use ICU facilities instead, so we can handle more // complex things such as fr_FR@euro, or whatever, encodings // and so on. int32 pos;