gettext backwards

  • Thread starter SPE - Stani's Python Editor
  • Start date
S

SPE - Stani's Python Editor

I am developping an international application for which I use gettext.
An user can fill in certain fields with variable names which are also
localized, eg: filename

_('filename') = 'bestandsnaam' #for dutch

As an english user might save this configuration, I want that eg a
Dutch user can open this configuration but see 'filename' in Dutch
('bestandsnaam'). So my question is, does gettext supports reverse
translation (assuming all translation strings are unique)? The reverse
function would take a translated string and put it back in the
original:

foo('bestandsnaam') = 'filename' #to allow an english user to work
with a file saved by a dutch user

Of course I can customize _() so it keeps track of the translations in
a reverse dictionary or I could build an external reverse dictionary,
but I was wondering if there was a more elegant solution.

Stani
--
http://www.stani.be
http://pythonide.stani.be




In my code this would be called like
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,871
Messages
2,569,919
Members
46,171
Latest member
A.N.Omalum

Latest Threads

Top