[I18n-sig] Bounty for Internationalization
Werner F. Bruhin
werner.bruhin at free.fr
Wed May 25 10:09:49 CEST 2005
Hi David,
Pitty that it is HTML stuff, don't like to work with that too much.
Was still a bit courios and looked a bit at it.
I am not sure that the way you deal with the gettext stuff will work,
i.e. I use wxPython so the I18n stuff also needs to deliver the .mo
files for wxPython, would guess that something along these lines is
necessary with the tools you are using.
Therefore I use gettext along these lines:
import gettext
gettext.install('twcb', os.path.join(os.getcwd(), 'locale'), unicode=0)
# BTW, the above installs _()
# the following you might want to do more dynamically if you support
many languages
localeDir = os.path.join(os.getcwd(), 'locale')
langEn = gettext.translation('twcb', localeDir, languages=['en'])
langFr = gettext.translation('twcb', localeDir, languages=['fr'])
langDe = gettext.translation('twcb', localeDir, languages=['de'])
# this is needed to ensure that e.g. accentent characters are accepted
by some of the widgets I use
locale.setlocale(locale.LC_ALL, '')
The locale directory structure is:
locale\fr\LC_MESSAGES
locale\en\LC_MESSAGES
locale\de\LC_MESSAGES
the above are the languages I support and each directory contains:
wxstd.mo # the wxPython stuff
twcb.mo # my stuff
To activate the language I do the following with the appropriate
language instance.
langFr.install()
I think besides the above for texts you also have to figure out how to
handle date formats (Month/Day/Year, Day/Month/Year etc).
You also might want to look a poEdit a very nice GUI to manage the .po
and .mo files and it includes some translation assistance.
Hope this is helpful.
Werner
David Moore wrote:
> Hi,
>
> The eXe project is developing an open source authoring environment to
> assist teachers and academics in the publishing of web content without
> the need to become proficient in HTML or XML markup.
>
> We are seeking interest for a bounty to internationalize the eXe user
> interface. This is to complete the work already done with the Python
> gettext module. The bounty will be for $1200 NZD. For more information
> please look at http://exe.cfdl.auckland.ac.nz/wiki/I18nBounty.
>
> If you are interested please email the eXe team (exe at auckland.ac.nz) and
> post a comment on the EduForge forum
> (https://eduforge.org/forum/forum.php?thread_id=413&forum_id=333) before
> 13 June 2005 (NZ).
>
>
> Thanks,
> David Moore
> eXe Project
> http://exe.cfdl.auckland.ac.nz/
>
More information about the I18n-sig
mailing list