Phoenix application "localisation" question(s)

Unlike with some other approaches, with “built-in” Phoenix localisation mechanisms when a translation is missing the msgid is used. Seems nice, but is this good or bad? :wink:

  1. For example – do you supply all the “translated” strings also for default locale? Seems like it doesn’t make much sense because every msgid and msgstr is in fact the same string AND msgid will be substituted anyway if one doesn’t supply msgstr, but maybe there are some gotchas? Any non-negligible performance penalties?
  2. Finding missing translations might be more tricky as it is easier to omit this or that and still no exception is risen… how do you ensure that all the relevant strings are covered/translated?

I’ve written a little test that ensures that no translations are forgotten coupled with the gettext check to ensure that all translations has been properly extracted to the pot/po files.

You can read a bit about it here: BoardClic tech blog if you’d like :slight_smile:

1 Like