472,133 Members | 1,020 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

gettext backwards

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

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.


In my code this would be called like

May 28 '07 #1
0 937

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Daniel CAUSSE | last post: by
1 post views Thread by Dave Patton | last post: by
14 posts views Thread by Pierre Rouleau | last post: by
1 post views Thread by Terry Hancock | last post: by
13 posts views Thread by cantabile | last post: by
reply views Thread by redhog | last post: by
1 post views Thread by James T. Dennis | last post: by
6 posts views Thread by =?iso-8859-1?B?QW5kcuk=?= | last post: by
2 posts views Thread by paolob | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.