Skip to content

Commit 10fdbf7

Browse files
celeron55kahrl
authored andcommittedJan 9, 2014
Set locale properly when built without gettext support
1 parent c3eb7fe commit 10fdbf7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎src/gettext.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,17 @@ void init_gettext(const char *path,std::string configured_language) {
251251
//errorstream << "Gettext debug: domainname = " << tdomain << "; codeset = "<< codeset << std::endl;
252252
#endif // defined(_WIN32)
253253

254+
#else
255+
/* set current system default locale */
256+
setlocale(LC_ALL, "");
257+
#endif // if USE_GETTEXT
258+
254259
/* no matter what locale is used we need number format to be "C" */
255260
/* to ensure formspec parameters are evaluated correct! */
256261

257-
258262
setlocale(LC_NUMERIC,"C");
259263
infostream << "Message locale is now set to: "
260264
<< setlocale(LC_ALL,0) << std::endl;
261-
262-
#endif // if USE_GETTEXT
263265
}
264266

265267

0 commit comments

Comments
 (0)
Please sign in to comment.