Some minor cleanup/polish...
This commit is contained in:
@@ -62,22 +62,20 @@ void bl_locale_set(const char *locale)
|
||||
try {
|
||||
if (locale && locale[0]) {
|
||||
_locale = gen(locale);
|
||||
std::locale::global(_locale);
|
||||
}
|
||||
else {
|
||||
#ifdef __APPLE__
|
||||
extern const char *user_locale; // pulled from Ghost_SystemCocoa
|
||||
std::string locale_osx = user_locale + std::string(".UTF-8");
|
||||
_locale = gen(locale_osx.c_str());
|
||||
std::locale::global(_locale);
|
||||
#else
|
||||
_locale = gen("");
|
||||
std::locale::global(_locale);
|
||||
#endif
|
||||
}
|
||||
std::locale::global(_locale);
|
||||
// Note: boost always uses "C" LC_NUMERIC by default!
|
||||
|
||||
/* Generate the locale string (useful to know which locale we are actually using in case of "default" one). */
|
||||
// Generate the locale string (useful to know which locale we are actually using in case of "default" one).
|
||||
#define LOCALE_INFO std::use_facet<boost::locale::info>(_locale)
|
||||
|
||||
locale_str = LOCALE_INFO.language();
|
||||
|
Reference in New Issue
Block a user