[Python-Dev] i18n

Anders Sandvig anders.sandvig at gmail.com
Tue Aug 17 13:59:28 CEST 2010


On Sat, Aug 14, 2010 at 10:18 AM, Jeroen Ruigrok van der Werven
<asmodai at in-nomine.org> wrote:
> I doubt you will be able to localize much with regard to the interpreter.
> The only thing that really comes to mind are the error and exception
> messages, but you will never be able to localize the errors themselves. The
> problem there is that if they seek help on international fora for Python,
> other people might have no clue what the (error) message even means.

I think one way to solve this might be to include the original
(English) error message as well as the translation. I've noticed this
is how error messages are handled in localized versions of Oracle, and
although I'm personally annoyed by it, I can see how some people might
find it useful.

For example:

>>> cause.error()
Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
NameError: name 'cause' is not defined

localized to Norwegian, could become:

>>> cause.error()
Tilbakesporing (nyeste kall sist):
    Fil "<stdin>", linje 1, i <module>
NameError: navn 'cause' er ikke definert (name 'cause' is not defined)

I think translating the actual error text would make sense, but I'm
not so sure about localizing the traceback output itself...


Anders


More information about the Python-Dev mailing list