[Pythonmac-SIG] Locale on MacOS 9
Kevin Altis
altis@semi-retired.com
Tue, 22 Jan 2002 16:07:46 -0800
I've checked changes into cvs for PythonCard to support localized language
and country resources as described in this message:
http://aspn.activestate.com/ASPN/Mail/Message/PythonCard/993748
http://aspn.activestate.com/ASPN/Mail/Message/PythonCard/993792
has some screen shots of the addresses sample running in French. There are
some other related threads on the PythonCard mailing list.
Does the locale module work correctly under MachoPython? If it doesn't work
under OS 9 or OS X, what is an alternative on the Mac that would produce
similar results? locale really should be available, but if not, I could
potentially do a platform check and a workaround for the Mac.
Ever hopeful on wxPython Mac, Real Soon Now,
ka
> -----Original Message-----
> From: pythonmac-sig-admin@python.org
> [mailto:pythonmac-sig-admin@python.org]On Behalf Of Francois Granger
> Sent: Monday, January 21, 2002 10:05 AM
> To: pythonmac-sig@python.org
> Subject: [Pythonmac-SIG] Locale on MacOS 9
>
>
>
> I am currently working on a multilinguale module. At the same time,
> PythonCard team is starting to think about localisation. So I did some
> search.
>
> On MacPython ther is an emulation of locale. But it does not work exactly
> the way I'd like ;-)
>
> On Windows:
>
> >>> import locale
> >>> locale.setlocale(locale.LC_ALL, '')
> 'French_France.1252'
> >>> locale.getdefaultlocale()
> ('fr_FR', 'cp1252')
>
> On the Mac:
> >>> import locale
> >>> locale.setlocale(locale.LC_ALL, '')
> 'C'
> >>> locale.getdefaultlocale()
> (None, 'mac-roman')
>
> Inside the file lib:locale.py line 303 it is said :
>
> To maintain compatibility with other platforms, not only the
> LANG variable is tested, but a list of variables given as
> envvars parameter. The first found to be defined will be
> used. envvars defaults to the search path used in GNU gettext;
> it must always contain the variable name 'LANG'.
>
> Where the list is 'LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG'
>
> I test defining os.envar before calling locale, but same answer.
>
> Any idea where I can look for this ?
>
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>