It seems to me that revel uses messaged based translation (just like gettext does), so you need
the original string to get the translation. These strings are stored in Config objects,
which are themselves stored in messages
of i18n.go, sorted by language.
As you can see, this mapping is not exported, so you can't access it. The best way to fix this is to write a function for what you want (getting the config by supplying a language) or exporting one of the existing functions and create a pull request for revel.
You may workaround this by copying the code of loadMessageFile
or by forking your version
of revel and exporting loadMessageFile
or parseMessagesFile
. This also is a great opportunity
to create a pull request.
Note that the localizations are stored in a INI file format parsed by robfig/config
,
so manually parsing is also an option (although not recommended).