How do flatpak locales work?

I’m trying to use local spell checking in a flatpak text editor (Apostrophe), it currently only lists English variants:

Now using multiple languages in Gnome itself is already a bit cumbersome, since there is no interface for it in the system settings. Some Googling tells me that enchant-2 is responsible for the languages, which in turn may use one or more backends for localization. On a default installation that apparently is hunspell:

$ enchant-lsmod-2 
hunspell (Hunspell Provider)

which in turn has a number of language packs, that are installable via dnf. I added my local language (NL) there:

$ rpm -qa | grep hunspell-nl
hunspell-nl-2.20.19-12.fc40.noarch

$ hunspell -D
/usr/share/hunspell/en_US
/usr/share/hunspell/nl_AW
/usr/share/hunspell/nl_BE
/usr/share/hunspell/nl_NL 
LOADED DICTIONARY:
/usr/share/hunspell/en_US.aff
/usr/share/hunspell/en_US.dic

This has no effect on the languages displayed in Apostrophe. I then saw this suggestion buried somewhere in their wiki, it’s from 4 years ago:

Now i’m getting a bit confused. So before i start installing random additional flatpaks based on old suggestions, i thought i would ask here first how this stuff is supposed to work normally.

Much appreciate your advice, thanks in advance :wink:

[edit] querying flatpak config gives back this about the languages:

$ flatpak config
languages: *unset* (default: en;nl)
extra-languages: *unset*
1 Like

Installing packages on your host system isn’t going to have an effect on your Flatpak applications, since they don’t run on your host system. They have their own separate everything. Locales are provided by Flatpak runtime extensions.

Right, that makes sense.

The flatpak config command indicates that en;nl locales should be available to flatpak, how should that work?

It should install a Dutch locale extension.

What is “it” in that context, and what should it do specifically?

If you can, please try to be a bit more specific.

1 Like

Flatpak should install a Dutch locale extension.

Check what you have installed with flatpak list.

It appears that an additional manual flatpak update was needed. For my scenario:

$ flatpak config --set languages "en;nl"

$ flatpak update

[...]

10. [✓] org.gnome.gitlab.somas.Apostrophe.Locale        stable       7.3 kB / 877.4 kB

NL is now available in the Apostrophe editor:

2024-08-24_16-54