Call for volunteers [was: Re: Localization]

Lubomir I. Ivanov neolit123 at gmail.com
Fri Oct 12 07:27:38 PDT 2012


On 12 October 2012 14:52, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> atm, can't help much without building.
>

ok, i can build natively on win32 now - at least the app without .mo files.
also the "all the text is boxes" problem is not present this way.

i'm able to show at least the window contents translated, by setting
some env. variables:
	putenv("LANGUAGE=de_DE.UTF-8");
	putenv("LANG=bg_BG.UTF-8");
	putenv("LC_ALL=bg_BG.UTF-8");
menu items remain untranslated.

problems:
1) the env. variables have to be set probably on runtime, unless we
want to create an EXE / BATCH launcher.
2) windows uses different naming, and there has to be some sort of a
conversation table:
puts(setlocale( LC_ALL, "english" )); /* -> English_United States.1252 */
while on POSIX -> en_US.UTF-8.

example of what has to be done (untested):
----------
/* main.c */

char *cur_loc = setlocale(LC_ALL, NULL);
char *converted =
some_function_to_convert_locale_based_on_a_lookup_table_or_something(cur_loc);
char buf[512] = {0};
strcat((char *)buf, "LANGUAGE=");
strcat((char *)buf, converted);
putenv(buf);

puts(setlocale( LC_ALL, ""));
bindtextdomain("subsurface", "./locale");
bind_textdomain_codeset("subsurface", "utf-8");
----------

lubomir
--


More information about the subsurface mailing list