summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-07-23 16:38:37 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-07-24 16:52:59 +0200
commitc578efb32b57b08275b9a0a2fd4a76b4e4b9e87d (patch)
tree6159b66d34e5294c715eaf53f9431dfbd9295d1e /src/main.cpp
parent5aa2679be7696862066edf617dc5a8261b7325ab (diff)
downloadminetest-c578efb32b57b08275b9a0a2fd4a76b4e4b9e87d.tar.gz
minetest-c578efb32b57b08275b9a0a2fd4a76b4e4b9e87d.tar.bz2
minetest-c578efb32b57b08275b9a0a2fd4a76b4e4b9e87d.zip
Refactor gettext init
Put the gettext init code in a macro and define it appropriately depending on whether gettext is actually available or not.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2f48d229f..bdfbc35f7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1132,11 +1132,7 @@ int main(int argc, char *argv[])
// Create user data directory
fs::CreateDir(porting::path_userdata);
-#ifdef LC_MESSAGES
- setlocale(LC_MESSAGES, "");
- bindtextdomain(PROJECT_NAME, (porting::path_userdata+"/locale").c_str());
- textdomain(PROJECT_NAME);
-#endif
+ init_gettext((porting::path_userdata+"/locale").c_str());
// Initialize debug streams
#ifdef RUN_IN_PLACE