How to I register locales in a Flatpak application?

137 Views Asked by At

I have created a gtk app https://github.com/mijorus/webapp-manager from the Builder template

and put a bunch of .po files in the /po folder.

Using flatpak-builder I can see them compiling

Installing po/sk/LC_MESSAGES/webapp-manager.mo to /app/share/locale/sk/LC_MESSAGES

But the app is always showing up in in English.

How can I fix that?

1

There are 1 best solutions below

0
On

The meson website has instructions on how to generate your first .pot file

Once you have the basic .pot, you can use the POedit software to translate it into the languages you want and then generate .po files for those languages.

With .po, you can add it to your project's po directory and it will be compiled into a .mo and placed in the right place.

Remembering that the translation will only appear if your computer is configured for the corresponding locale.