aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/I18n.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/I18n.cc b/src/FbTk/I18n.cc
index 81ff078..3daa2e9 100644
--- a/src/FbTk/I18n.cc
+++ b/src/FbTk/I18n.cc
@@ -72,17 +72,17 @@ void NLSInit(const char *catalog) {
72 72
73 73
74I18n::I18n():m_multibyte(false), m_utf8_translate(false), m_catalog_fd((nl_catd)(-1)) { 74I18n::I18n():m_multibyte(false), m_utf8_translate(false), m_catalog_fd((nl_catd)(-1)) {
75#ifdef HAVE_SETLOCALE 75#if defined(HAVE_SETLOCALE) && defined(NLS)
76 //make sure we don't get 0 to m_locale string 76 //make sure we don't get 0 to m_locale string
77 char *temp = setlocale(LC_MESSAGES, ""); 77 char *temp = setlocale(LC_MESSAGES, "");
78 m_locale = ( temp ? temp : ""); 78 m_locale = ( temp ? temp : "");
79 if (m_locale.empty()) { 79 if (m_locale.empty()) {
80 cerr<<"Warning: Failed to set locale, reverting to \"C\""<<endl; 80 cerr<<"Warning: Failed to set locale, reverting to \"C\""<<endl;
81#endif // HAVE_SETLOCALE 81#endif // defined(HAVE_SETLOCALE) && defined(NLS)
82 82
83 m_locale = "C"; 83 m_locale = "C";
84 84
85#ifdef HAVE_SETLOCALE 85#if defined(HAVE_SETLOCALE) && defined(NLS)
86 86
87 } else { 87 } else {
88 88
@@ -102,7 +102,7 @@ I18n::I18n():m_multibyte(false), m_utf8_translate(false), m_catalog_fd((nl_catd)
102 if (index != string::npos) 102 if (index != string::npos)
103 m_locale.erase(0,index+1); //erase all characters starting up to index 103 m_locale.erase(0,index+1); //erase all characters starting up to index
104 } 104 }
105#endif // HAVE_SETLOCALE 105#endif // defined(HAVE_SETLOCALE) && defined(NLS)
106} 106}
107 107
108 108