Internationalisation - Locale file location for gettext

I can’t find any documentation on this, but I think that in a Flatpak, gettext expects a {myapp} {language} file to be found in /app/share/locale/(language}/LC_MESSAGES/{myapp}.mo.

I used Meson statements to put it there, Meson’s ‘prefix’ variable supplies ‘/app/share’ and ‘localedir’ points to ‘locale’.

  '{myapp}_{language}.mo', rename : '{myapp}.mo',
  install_dir: join_paths(get_option('prefix'), get_option('localedir'), '{language}', 'LC_MESSAGES')

Edit: I’ve solved my own problem, so I’ve changed this post to a tip.