How to set the language?
-
Kreuvf
- Global Moderator

- Posts: 254
- Joined: 22 Sep 2006, 20:56
How to set the language?
I asked about it in the dev-chan some time ago, but for me (as I plan to do some writing on the readme for 2.1) it's easier if the info is in that forum.
So: How to make Warzone use the language-file you want to use?
So: How to make Warzone use the language-file you want to use?
-
DevUrandom
- Regular

- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: How to set the language?
The warzone2100.mo file needs to be in a /LC_MESSAGES/ directory where LOCALEDIR points to. (Defined on compilation, usually /usr/local/share/locale/)
Then you need to set LANG=_[.UTF-8] before running Warzone.
For example:
Then you need to set LANG=_[.UTF-8] before running Warzone.
For example:
Code: Select all
$ ls -l /usr/local/share/locale/de/LC_MESSAGES/warzone2100.mo
-rw-r--r-- 1 root root 176588 2008-03-04 14:54 /usr/local/share/locale/de/LC_MESSAGES/warzone2100.mo
LANG=de_DE.UTF-8 ./src/warzone2100
Last edited by DevUrandom on 07 Mar 2008, 12:38, edited 1 time in total.
-
Kreuvf
- Global Moderator

- Posts: 254
- Joined: 22 Sep 2006, 20:56
Re: How to set the language?
DevUrandom wrote:Code: Select all
$ ll /usr/local/share/locale/de/LC_MESSAGES/warzone2100.mo -rw-r--r-- 1 root root 176588 2008-03-04 14:54 /usr/local/share/locale/de/LC_MESSAGES/warzone2100.mo LANG=de_DE.UTF-8 ./src/warzone2100
Code: Select all
llCode: Select all
ls -l
Last edited by Kreuvf on 07 Mar 2008, 09:22, edited 1 time in total.
-
DevUrandom
- Regular

- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: How to set the language?
Yes, sorry, corrected that.
You get that file into this position by running "make install".
You get that file into this position by running "make install".
-
Kreuvf
- Global Moderator

- Posts: 254
- Joined: 22 Sep 2006, 20:56
Re: How to set the language?
And users that do not self-compile (e. g. use *.deb-packages) then can just start Warzone with
LANG=de_DE.UTF-8 [wherever warzone is located]
?
LANG=de_DE.UTF-8 [wherever warzone is located]
?
-
Devil12
- Rookie

- Posts: 31
- Joined: 29 Feb 2008, 13:17
- Location: Aachen - Germany
-
DevUrandom
- Regular

- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: How to set the language?
Users who install a package from their distribution should just be able to run Warzone 2100 from the application menu, given that they have selected eg. "German" as the language for their distribution.Kreuvf wrote: And users that do not self-compile (e. g. use *.deb-packages) then can just start Warzone with
LANG=de_DE.UTF-8 [wherever warzone is located]
?
Otherwise you'd have to run
Code: Select all
LANG=de_DE.UTF-8 warzone2100-
Devil12
- Rookie

- Posts: 31
- Joined: 29 Feb 2008, 13:17
- Location: Aachen - Germany
-
Buginator
- Professional

- Posts: 3285
- Joined: 04 Nov 2007, 02:20
Re: How to set the language?
He shows you what to type in the console.Devil12 wrote: And how do I do that?
I never did this before.
If you on windows, you can try SET LANG=... in a command prompt, or enter in your environment variables.DevUrandom wrote:from the console.[/size]Code: Select all
LANG=de_DE.UTF-8 warzone2100
Dunno if it will work though.
and it ends here.
-
Devil12
- Rookie

- Posts: 31
- Joined: 29 Feb 2008, 13:17
- Location: Aachen - Germany
-
Kreuvf
- Global Moderator

- Posts: 254
- Joined: 22 Sep 2006, 20:56
Re: How to set the language?
Is it necessary to specify the character encoding?
Could you just do as well?
Could you just do
Code: Select all
LANG=de_DE-
DevUrandom
- Regular

- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: How to set the language?
Should work too.Kreuvf wrote: Is it necessary to specify the character encoding?
Could you just doas well?Code: Select all
LANG=de_DE
And you need to have the locale directory structure at the correct position... Where that is I am currently trying to find out, but MSVC keeps crashing upon me, my VBox goes down regularly, and it all *$*%*...
-
Devil12
- Rookie

- Posts: 31
- Joined: 29 Feb 2008, 13:17
- Location: Aachen - Germany
-
Buginator
- Professional

- Posts: 3285
- Joined: 04 Nov 2007, 02:20
Re: How to set the language?
Perhaps this will help?Devil12 wrote: It doesn't seem to work.
Isn't there an other way to set the Language?
http://gnuwin32.sourceforge.net/install.html
Most GNU packages have the ability to output messages in several languages. This native-language support (NLS) requires the LibIntl and the LibIconv libraries. On MS-Windows they have been adapted so that NLS chooses the system language, unless one of the environment variables LANG or LANGUAGE has been set. The language codes (ISO 639) for these environment variables are different from the MS-Windows ones. When using a program in a console window (command.com or cmd.exe) and setting LANG or LANGUAGE, you must also set the correct code page with the chcp command; for European languages, code page 1252 usually suffices.
and it ends here.
-
DevUrandom
- Regular

- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: How to set the language?
I've got an exe in beta testing which works for me. So as long as I wasn't tricked by something, in 2.1_beta2 you'll have a working setup right out of the windows installer (*cough*). (On Linux this should already have worked without problems.)