[GRASS-dev] locale problem solved - but have suggestion

Maris Nartiss maris.gis at gmail.com
Wed Aug 1 07:04:11 PDT 2012

there are numerous issues with current approach, including ability to
changing locale to non-working one (hey, Python, it's 2012 and UTF-8
locales are common!).

Please test following patch on Mac and Windows GRASS versions:
copy attached file to grass-trunk source code;
apply it with 'patch -p0 < change_GUI_language.patch'

Provide only available languages as a choice (we don't have GRASS
Esperanto version (yet));
Store only language code in preferences, as encoding guess might be wrong;
Fall back to language.UTF-8, if Python's locale guess is wrong;
Fall back to C, if all attempts to change LC_MESSAGE have been
unsuccessful (i.e. locale not available).

If it works for You (Michael, I especially looking at You now), I'll commit it.
Tested on Gentoo Linux with lv_LV.UTF-8 and pl_PL locales. Setting
unsupported locale (i.e. ru) causes fail back to C.


2012/8/1 Markus Neteler <neteler at osgeo.org>:
> On Wed, Aug 1, 2012 at 7:35 AM, Michael Barton <Michael.Barton at asu.edu> wrote:
>> FWIW, I've so far tried hard coding language settings in various ways to test, including:
> ...
> Is NLS enabled in that compilation?
> Markus
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change_GUI_language.patch
Type: application/octet-stream
Size: 3360 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20120801/ad85fe06/attachment.obj>

More information about the grass-dev mailing list