What would be the best approach to do the following:
if lang=="en-US":
chapter="chapter"
if lang=="fr-FR":
chapter="chapitre"
# etc.
Essentially I’m looking for a mapping that would do something like:
lang = ['en-US', 'fr-FR', ...] --> chapter = ['chapter', 'chapitre', ...]
How would I accomplish this? Thank you.
I always use a dictionary for that.
But for translations, you should also consider gettext.