Languages in 2.4.0

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Languages in 2.4.0

Post by Arbogast »

I don't seem to get freeciv 2.4.0 to play in english, even if I choose english during the installation. Played the first game in english, but ever since, it's in my default windows/french.
The instructions for changing languages -adding en_GB in the properties window of the exe, for instance- don't seem to work.

Am I doing something wrong or is 2.4.0 different from other versions?

Thanks in advance.
cazfi
Elite
Posts: 3095
Joined: Tue Jan 29, 2013 6:54 pm

Re: Languages in 2.4.0

Post by cazfi »

I don't have Windows to test the installer, but are you trying to use British English (en_GB) as you mentioned, or American English (en_US, builtin language)? If former, did you both selected en_GB translation from the list of languages to install, and set it as default language during install?
User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Languages in 2.4.0

Post by Arbogast »

Yes I did use the 'en_GB' during the install and I didn't find the 'en_US' in the list of languages.
As I said, the first game went allright in english. Since then -about 5/7 games- have all been in french.
Now:
1) I tried to modify the exe files thru the properties window by adding 'en_GB' in the shortcut/target, but it won't load.
Tried adding quotes and when I click the 'apply' button, it erases the quotes.
2) Tried creating a .bat file as per sugestions in the wiki but failed miserably.
3) I can't find where the 'auto' tag.
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: Languages in 2.4.0

Post by JTN »

Thanks for the feedback.
Arbogast wrote:I don't seem to get freeciv 2.4.0 to play in english, even if I choose english during the installation. Played the first game in english, but ever since, it's in my default windows/french.
How exactly are you launching Freeciv? The language controls in the Windows installer only affect the shortcuts added to the Start menu. If you launch freeciv-gtk2.exe directly somehow, you'll bypass the arrangements made by the installer, and get the default language.

When you refer to the "first game", was that launched directly from the installer (it offers to run Freeciv after installation by default)? That invocation definitely arranges to use the language selected in the installer, so I can see how it could be different to subsequent runs.
Arbogast wrote:The instructions for changing languages -adding en_GB in the properties window of the exe, for instance- don't seem to work.
1) I tried to modify the exe files thru the properties window by adding 'en_GB' in the shortcut/target, but it won't load.
Tried adding quotes and when I click the 'apply' button, it erases the quotes.
I assume you're referring to the "Interface Language" wiki page.

The intention is that you modify the properties of the shortcut that appears in the Start menu. This shortcut itself invokes freeciv-gtk2.cmd (note, not .exe), which is a wrapper script that sets an environment variable and runs freeciv-gtk2.exe.

You should always find that you are modifying an existing language code (or "auto"), not adding one where there wasn't one before.
Arbogast wrote:Am I doing something wrong or is 2.4.0 different from other versions?
Did this used to work for you in 2.3.x? I don't think the details have changed (but I haven't checked).
Arbogast wrote:Yes I did use the 'en_GB' during the install and I didn't find the 'en_US' in the list of languages.
en_US isn't included in the list; we should fix that.
(But if you enter en_US as a language code when editing the shortcut manually, it works -- I've tested this.)
Arbogast wrote:As I said, the first game went allright in english. Since then -about 5/7 games- have all been in french.
Do you mean the language is intermittent? That's odd, if so. Are you launching it the exact same way every time?
Arbogast wrote:2) Tried creating a .bat file as per sugestions in the wiki but failed miserably.
Well, I'd rather focus on getting this working without users having to faff around with .bat files, but if you can provide details of what went wrong when you tried, that might shed some light.
Arbogast wrote:3) I can't find where the 'auto' tag.
This is unclear -- can you explain further?

If you can't find where the 'auto' tag is to change it to 'en_GB', I think that might be the root of your problem, as I've said above.

The 'auto' tag is interpreted in freeciv-gtk2.cmd (which uses it as a trigger to not set an environment variable to force the language, leaving the default selection rules for freeciv-gtk2.exe; I confess I don't know how the default selection works).


I did some testing of the installer language features myself, on my Windows 7 installation. Since my system language is British English, I can't install a French language (certainly not without paying Microsoft), but I can and have installed Irish (Gaeilge), for which Freeciv has a partial localisation.

Unfortunately 'auto' always selects the British English localisation even if my user language is Irish, so I can't test quite your situation. But I have tried installing Freeciv as Irish in an English system. I launched Freeciv several times (from the Start menu) and got Irish every time, not the intermittency you report.
User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Languages in 2.4.0

Post by Arbogast »

Answers to JTN:
oh boy! This is getting longuish... Ok, here I go:
How exactly are you launching Freeciv?
As I said before, I just click on the FreeCiv Icon, I assumed it's the .exe one. I'll try lauching the.cmd one as soon as I finish this post.
Yes, the first game was directly from the installer.
I assume you're referring to the "Interface Language" wiki page.
Right to that; as you mentioned, the 'en_US' isn't in the list.
You should always find that you are modifying an existing language code (or "auto"), not adding one where there wasn't one before.
That's the "auto" that I have been looking for and can't find.

Yes, 2.3.x works fine with the shortcut as ["C:\Program Files\Freeciv-2.3.4-gtk2\freeciv-gtk2.cmd" en_GB].
But in 2.4.0 if I add "en_GB" or "en_US" freeciv will not launch. If I try to place the quotes as in the 2.3.4 and press the 'apply' button, the quotes disappear. I think I mentioned this before.
If you can't find where the 'auto' tag is to change it to 'en_GB'
This is ambiguous. I think you swallowed a word or two. And that is the root of the problem allright! :mrgreen:
As for changing languages it is NOT in the OS, but in the freeciv itself. (I use three languages with no problems)

Your last quote (Unfortunately 'auto'...) has me worried. Is my windows sick?

Anyhow, Thanks for your attention :)

Note: I've tried to apply your sugestions to the .exe file = no luck. The .cmd file doesn't have a shorcut tab in its properties.
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: Languages in 2.4.0

Post by JTN »

Arbogast wrote:As I said before, I just click on the FreeCiv Icon, I assumed it's the .exe one.
Where exactly are you finding this icon, and what's it called?
Arbogast wrote:Yes, 2.3.x works fine with the shortcut as ["C:\Program Files\Freeciv-2.3.4-gtk2\freeciv-gtk2.cmd" en_GB].
But in 2.4.0 if I add "en_GB" or "en_US" freeciv will not launch. If I try to place the quotes as in the 2.3.4 and press the 'apply' button, the quotes disappear. I think I mentioned this before.
The 2.3.4 command line looks like the one I'd expect, I think.
What exactly is the full 2.4.0-RC1 command line after you have edited it?

(I'm trying to ascertain whether we are talking about the same properties dialog, since there are several possibilities.)
Arbogast wrote:Your last quote (Unfortunately 'auto'...) has me worried. Is my windows sick?
I'm just observing that freeciv-gtk2.exe's default language selection on my system is sub-optimal. On your system it seems to work as expected (it picks French); yours is working better than mine, in fact. This is I think down to the localisation library Freeciv is linked against and, I can think of several reasons why it might pick wrong (user vs system language, Irish seems to be a "subsidiary" localisation in Windows, ...) None of which is relevant to your problem, which is about what happens when we try to explicitly override this default selection.
User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Languages in 2.4.0

Post by Arbogast »

Under Windows, 'Start' menu, 'all programs', 'Freeciv 2.4.0-RC1 (GTK+ client)' dir, '"G:\Freeciv-2.4.0-RC1-gtk2\freeciv-gtk2.cmd" en_GB' file.

Now, THE GOOD NEWS!
As you can notice, the icon invokes the .cmd file, so now it accepts the quotes and the 'en_GB' or 'en_US'
I noticed this checking the 2.3.4 properties but the 2.4.0 properties were .exe. So I modified the 2.4.0 properties and now I have freeciv in good old english! :D (example at the end of the first line)

So the answer to all this: Right-click on the Freeciv icon (the litle bronze globe, see below, since one cannot post .ico files, I posted this .png), change .exe into .cmd, put everything in double quotes("") and then, add the language tab of your choice, validate choices and exit. Now, 'go give them hell!'

EDIT: Thanks to JTN for pointing me in the right direction, we both got around in many circles, but finally got to the end of things. merci beaucoup! :mrgreen:
Attachments
civicon.png
civicon.png (3.93 KiB) Viewed 9419 times
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: Languages in 2.4.0

Post by JTN »

I'm glad you've resolved your issue, but for me the mystery remains how you ended up with a Start Menu shortcut pointing to the .exe rather than the .cmd, after installing the 2.4.0-RC1 installer.
It doesn't do that for me, and looking at the installer creation process, I don't see an obvious way it can happen.
User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Languages in 2.4.0

Post by Arbogast »

How about that? It ain't me, It was windows or someon else, I swear on my mother's head, I didn't do nothing!
No, seriously, that glitch stomped me, and since then I don't get that famous error message. Go figure.
But again, thanks a lot, even for the thread in gna.org
Post Reply