By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

gettext backwards

P: n/a
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

May 28 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.