How to set the language?

Warzone 2.1.x series. (Unsupported--read only!)
User avatar
Kreuvf
Global Moderator
Global Moderator
Posts: 254
Joined: 22 Sep 2006, 20:56

How to set the language?

Post by Kreuvf »

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?
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: How to set the language?

Post by DevUrandom »

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:

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.
User avatar
Kreuvf
Global Moderator
Global Moderator
Posts: 254
Joined: 22 Sep 2006, 20:56

Re: How to set the language?

Post by Kreuvf »

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

ll
is an alias for

Code: Select all

ls -l
, right?
Last edited by Kreuvf on 07 Mar 2008, 09:22, edited 1 time in total.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: How to set the language?

Post by DevUrandom »

Yes, sorry, corrected that.
You get that file into this position by running "make install".
User avatar
Kreuvf
Global Moderator
Global Moderator
Posts: 254
Joined: 22 Sep 2006, 20:56

Re: How to set the language?

Post by Kreuvf »

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]
?
User avatar
Devil12
Rookie
Rookie
Posts: 31
Joined: 29 Feb 2008, 13:17
Location: Aachen - Germany

Re: How to set the language?

Post by Devil12 »

Sorry that I have to ask.
Where do I have to enter this?
Image
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: How to set the language?

Post by DevUrandom »

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]
?
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.
Otherwise you'd have to run

Code: Select all

LANG=de_DE.UTF-8 warzone2100
from the console.
User avatar
Devil12
Rookie
Rookie
Posts: 31
Joined: 29 Feb 2008, 13:17
Location: Aachen - Germany

Re: How to set the language?

Post by Devil12 »

And how do I do that?
I never did this before.
Image
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: How to set the language?

Post by Buginator »

Devil12 wrote: And how do I do that?
I never did this before.
He shows you what to type in the console.
DevUrandom wrote:

Code: Select all

LANG=de_DE.UTF-8 warzone2100
from the console.[/size]
If you on windows, you can try SET LANG=...  in a command prompt, or enter in your environment variables.
Dunno if it will work though.
and it ends here.
User avatar
Devil12
Rookie
Rookie
Posts: 31
Joined: 29 Feb 2008, 13:17
Location: Aachen - Germany

Re: How to set the language?

Post by Devil12 »

It doesn't seem to work.
Isn't there an other way to set the Language?
Image
User avatar
Kreuvf
Global Moderator
Global Moderator
Posts: 254
Joined: 22 Sep 2006, 20:56

Re: How to set the language?

Post by Kreuvf »

Is it necessary to specify the character encoding?
Could you just do

Code: Select all

LANG=de_DE
as well?
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: How to set the language?

Post by DevUrandom »

Kreuvf wrote: Is it necessary to specify the character encoding?
Could you just do

Code: Select all

LANG=de_DE
as well?
Should work too.
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 *$*%*...
User avatar
Devil12
Rookie
Rookie
Posts: 31
Joined: 29 Feb 2008, 13:17
Location: Aachen - Germany

Re: How to set the language?

Post by Devil12 »

When you got the position, can you explain for me what to do, please?
Image
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: How to set the language?

Post by Buginator »

Devil12 wrote: It doesn't seem to work.
Isn't there an other way to set the Language?
Perhaps this will help?

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.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: How to set the language?

Post by DevUrandom »

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.)