danhper / python-i18n

Easy to use i18n library for Python
https://pypi.python.org/pypi/python-i18n
MIT License
228 stars 45 forks source link

How to get reverse translation? #42

Open fhg-isi opened 6 months ago

fhg-isi commented 6 months ago

Lets say I have a translation file containing a section

de_DE:
  hello: Hallo

How can I get the reverse translation Hallo => hello?

If there is now build-in function for reverse translation, how can I access the already read in translations to create a reverse dictionary from its entries?

solaluset commented 5 months ago

from i18n.translations import container