-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n support in menus, German l10n (incomplete) #283
base: master
Are you sure you want to change the base?
Conversation
I object to the script name. Andrea Faulds notifications@github.com schrieb am Do., 09.07.2015, 3:00:
|
You might think it's far too short. But, this is actually the standard abbreviation used for GNU's gettext, so it seemed fitting. |
I guess I'd have to figure out how widely used this is. Andrea Faulds notifications@github.com schrieb am Do., 09.07.2015, 17:24:
|
A problem with using IETF language tags ("en", "de-DE" etc.) is we'd have to map them to names somehow. The only practical way I can see would be to parse every .lang file we can see, but then if one of them is malformed, trying to switch language will crash GG2 (parse error). A better idea is probably just to have a free-form language name, and encourage native-language naming. So "British English.lang", "Deutsch.lang", "nihongo.lang", "español.lang", "hangug-eo.lang", etc. That's user-friendly and means we don't have to look at file contents to list files. |
Actually I probably won't finish this for a while, but it's a start |
This adds basic internationalisation (i18n) support, by adding a
_(string)
function to look up localised strings in the current language. These strings are loaded from GGON.lang
files.It then adds use of
_()
to GG2's menus, but not its in-game text just yet, and a preliminary German localisation strings file for those localisable areas.Since German requires non-ASCII characters, this is branched off from the Windows-1252 support pull request, which is a prerequisite.
This isn't the be considered complete and mergeable just yet, since it's only covering the menus for now, and I haven't got round to the necessary changes in width of some of them to accommodate German's verbosity. Also, my German's probably riddled with errors.
Note that in order to review
.lang
files, you'll need to view them in the Windows-1252 encoding that Gang Garrison 2 uses. I suggest clicking "View", then "Raw", then changing your browser's encoding settings for that page (in Firefox: View > Text Encoding).