summaryrefslogtreecommitdiff
path: root/lib/localization.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:17:51 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:17:51 +0200
commit237aedc590b58c0e69d7dfcac92b5f767b7c004a (patch)
tree83f361a82ba483f2daf83b677e8685cd953812d9 /lib/localization.cpp
parent4.5 (diff)
downloadFreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.tar.gz
FreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.tar.bz2
FreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.zip
4.6
Diffstat (limited to 'lib/localization.cpp')
-rw-r--r--lib/localization.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/localization.cpp b/lib/localization.cpp
index 574910ea..8084eb42 100644
--- a/lib/localization.cpp
+++ b/lib/localization.cpp
@@ -28,8 +28,6 @@ using namespace zen;
namespace
{
//global objects
-std::wstring THOUSANDS_SEPARATOR = L",";
-
class FFSLocale : public TranslationHandler
{
@@ -38,8 +36,6 @@ public:
wxLanguage langId() const { return langId_; }
- virtual std::wstring thousandsSeparator() { return THOUSANDS_SEPARATOR; };
-
virtual std::wstring translate(const std::wstring& text)
{
//look for translation in buffer table
@@ -352,23 +348,13 @@ public:
const wxLanguageInfo* sysLngInfo = wxLocale::GetLanguageInfo(wxLocale::GetSystemLanguage());
const wxLanguageInfo* selLngInfo = wxLocale::GetLanguageInfo(selectedLng);
- bool sysLangIsRTL = sysLngInfo ? sysLngInfo->LayoutDirection == wxLayout_RightToLeft : false;
- bool selectedLangIsRTL = selLngInfo ? selLngInfo->LayoutDirection == wxLayout_RightToLeft : false;
+ const bool sysLangIsRTL = sysLngInfo ? sysLngInfo->LayoutDirection == wxLayout_RightToLeft : false;
+ const bool selectedLangIsRTL = selLngInfo ? selLngInfo->LayoutDirection == wxLayout_RightToLeft : false;
if (sysLangIsRTL == selectedLangIsRTL)
loc.Init(wxLANGUAGE_DEFAULT); //use sys-lang to preserve sub-language specific rules (e.g. german swiss number punctation)
else
loc.Init(selectedLng);
-
- //::setlocale (LC_ALL, ""); -> implicitly called by wxLocale
- const lconv* localInfo = ::localeconv();
-
- //actually these two parameters are language dependent, but we take system setting to handle all kinds of language derivations
- THOUSANDS_SEPARATOR = utf8CvrtTo<wxString>(localInfo->thousands_sep);
-
- // why not working?
- // THOUSANDS_SEPARATOR = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).thousands_sep();
- // DECIMAL_POINT = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).decimal_point();
}
private:
wxLocale loc; //required for RTL language support (and nothing else)
bgstack15