diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2007-08-13 10:20:01 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2007-08-13 10:20:01 +0000 |
commit | d57bf8dbc6b035b2c0306fbc113a2880d9c50984 (patch) | |
tree | 66c2004acf84566c88d5640ec86aafe2e9481ba9 | |
parent | 81219329d4090dd2b1e3c37ae005f3c7795f4d08 (diff) | |
download | Mana-d57bf8dbc6b035b2c0306fbc113a2880d9c50984.tar.gz Mana-d57bf8dbc6b035b2c0306fbc113a2880d9c50984.tar.bz2 Mana-d57bf8dbc6b035b2c0306fbc113a2880d9c50984.tar.xz Mana-d57bf8dbc6b035b2c0306fbc113a2880d9c50984.zip |
Fixed internationalization support on Windows.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/main.cpp | 5 | ||||
-rw-r--r-- | tmw.cbp | 35 |
3 files changed, 34 insertions, 10 deletions
@@ -1,3 +1,7 @@ +2007-08-13 Eugenio Favalli <elvenprogrammer@gmail.com> + + * src/main.cpp, tmw.cbp: Fixed internationalization support on Windows. + 2007-08-10 Guillaume Melquiond <guillaume.melquiond@gmail.com> * src/gui/npclistdialog.cpp, src/gui/npclistdialog.h, diff --git a/src/main.cpp b/src/main.cpp index 9a51f2e4..67086f9f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -650,6 +650,8 @@ void initXML() xmlSetGenericErrorFunc(NULL, xmlNullLogger); } +extern "C" char const *_nl_locale_name_default(void); + /** Main */ int main(int argc, char *argv[]) { @@ -668,6 +670,9 @@ int main(int argc, char *argv[]) } #if ENABLE_NLS +#ifdef WIN32 + putenv(("LANG=" + std::string(_nl_locale_name_default())).c_str()); +#endif setlocale(LC_MESSAGES, ""); bindtextdomain("tmw", LOCALEDIR); bind_textdomain_codeset("tmw", "UTF-8"); @@ -20,6 +20,8 @@ <Add option="-Wall"/> <Add option="-DUSE_OPENGL"/> <Add option="-DNOGDI"/> + <Add option="-DENABLE_NLS"/> + <Add option="-DLOCALEDIR=\"locale\""/> </Compiler> <Linker> <Add library="enet"/> @@ -39,6 +41,7 @@ <Add library="physfs"/> <Add library="curl.dll"/> <Add library="winmm"/> + <Add library="intl.dll"/> </Linker> </Target> </Build> @@ -1020,16 +1023,6 @@ <Option link="0"/> <Option target="default"/> </Unit> - <Unit filename="src\net\equipmenthandler.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - </Unit> - <Unit filename="src\net\equipmenthandler.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> <Unit filename="src\net\gameserver\gameserver.cpp"> <Option compilerVar="CPP"/> <Option target="default"/> @@ -1170,6 +1163,12 @@ <Option link="0"/> <Option target="default"/> </Unit> + <Unit filename="src\net\protocol.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> <Unit filename="src\net\skillhandler.cpp"> <Option compilerVar="CPP"/> <Option target="default"/> @@ -1521,6 +1520,22 @@ <Option link="0"/> <Option target="default"/> </Unit> + <Unit filename="src\utils\gettext.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="src\utils\strprintf.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\utils\strprintf.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> <Unit filename="src\utils\tostring.h"> <Option compilerVar=""/> <Option compile="0"/> |