Forums

Full Version: Is the multilanguage support working?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've been testing a bit. Using system default and removing language selection from gui is the best option I think.

Translators can still override it by setting the environment variable LANGUAGE.

E.g. set preferred languages to gd, de, en...

linux shell:
Code:
export LANGUAGE=gd:de:en

windows cmd:
Code:
set LANGUAGE=gd:de:en

[Image: Md90PaZ.jpg]
No, [undefined=undefined]please don't[/undefined] do this. Most users don't even know what a system locale is, let alone how to set it. No computer on this Earth will come with a pre-selected Gaelic system locale, so my language will miss out. Also, Gaelic speakers and English speakers might share a computer, and having to change the system locale every time they want to play the game is not convenient. If you're interested, you can read more abut the problem on this blog.

Scanning for available po/mo files would work perfectly fine for the menu. Alternatively, you could introduce a config file that lists the preferred font set as well as the native language name for each locale - this will come in handy for languages that don't use Latin script. You can steal from Battle for Wesnoth for that Wink

If a message in a po/mo file is missing, gettext will default to English for that message, so partial translations are not a problem.

At the moment, we have the problem that po/mo files just aren't loaded - as I said, I tested for German and Gaelic with both the po and the mo file present. So, forcing the system locale won't fix this, I don't think. BTW I have set my system locale to Gaelic, and vdrift didn't load tha gd file. I did create the .mo file myself with the same file structure as the included mo file for German.
(07-07-2014, 09:08 AM)GunChleoc Wrote: [ -> ]No, [undefined=undefined]please don't[/undefined] do this. Most users don't even know what a system locale is, let alone how to set it. No computer on this Earth will come with a pre-selected Gaelic system locale, so my language will miss out. Also, Gaelic speakers and English speakers might share a computer, and having to change the system locale every time they want to play the game is not convenient. If you're interested, you can read more abut the problem on this blog.

Scanning for available po/mo files would work perfectly fine for the menu. Alternatively, you could introduce a config file that lists the preferred font set as well as the native language name for each locale - this will come in handy for languages that don't use Latin script. You can steal from Battle for Wesnoth for that Wink

If a message in a po/mo file is missing, gettext will default to English for that message, so partial translations are not a problem.

At the moment, we have the problem that po/mo files just aren't loaded - as I said, I tested for German and Gaelic with both the po and the mo file present. So, forcing the system locale won't fix this, I don't think. BTW I have set my system locale to Gaelic, and vdrift didn't load tha gd file. I did create the .mo file myself with the same file structure as the included mo file for German.

The test version doesn't load the system default, but attempts to load the chosen language, based on the language id (en, de, ...) and fails.

If you know of any open source app/game that uses gettext and has a working language selection. We may be able to use their code. Currently I don't see any "sane" option. Does Battle for Wesnoth have a language selection that works on linux/windows/osx?

Just scanning for vdrift.mo message catalogs doesn't guarantee that gettext will use it. So you will end up with users seeing their language in the options but not getting it to work.

Edit:
We do support non-latin fonts.


Edit:
Looking at Battle for Westnoth: https://github.com/wesnoth/wesnoth/blob/...nguage.cpp

They are modifying the environment variables to force the language. Which I'd consider as not "sane". But yes, we could do that too.
Here are some more projects that use gettext - maybe there are saner options available:

https://wl.widelands.org/

http://supertuxkart.sourceforge.net/

http://www.nongnu.org/enigma/index.html

http://neverball.org/index.php

http://play0ad.com/

https://l10n.gnome.org/

http://tuxpaint.org/

http://gcompris.net/

Regarding the fonts, I have generally seen 2 basic implementations around - config files, or letting translators translate a string in the main .po file.

As to language names, I think native language names are better, because it helps you find your language e.g. if you're an English speaker and accidentally set it to Chinese.

Thanks for looking into this. Smile
Pages: 1 2