Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_intl.c
Log Message:
no - u NEED to set the LNAG for gettext to use that lang - if u dont e can't
change its lang runtime. :) the problem is it gets inherited by child
processes... thus make it use the result of getenv to init... (a NULL retunr
will mean e tries to use en anyway)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_intl.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_intl.c 14 Apr 2005 05:32:10 -0000 1.13
+++ e_intl.c 14 Apr 2005 05:49:17 -0000 1.14
@@ -44,7 +44,7 @@
ADD_LANG("fr");
/* FIXME: NULL == use LANG. make this read a config value if it exists */
- e_intl_language_set(NULL);
+ e_intl_language_set(getenv("LANG"));
return 1;
}
@@ -60,14 +60,14 @@
void
e_intl_language_set(const char *lang)
{
+ char buf[4096];
+
if (_e_intl_language) free(_e_intl_language);
if (!lang) lang = getenv("LANG");
- if (!lang)
- {
- setenv("LANG", "en", 1);
- lang = "en";
- }
+ if (!lang) lang = "en";
_e_intl_language = strdup(lang);
+ snprintf(buf, sizeof(buf), "LANG=%s", _e_intl_language);
+ putenv(buf);
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALE_DIR);
textdomain(PACKAGE);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs