The Gramps flatpak from flathub uses system locales just fine.
It is only the archived flatpaks at gramps-project github that are only English for now, and that is because my github workflow is missing the command to allow the use of system locales after compiling. Once someone at the flathub discourse gives me the command, I can recompile the gramps-project archives to use system locales.
I got the answer from Flathub about why their flatpaks use the user’s system locale, but not the flatpaks compiled with the Github workflows. It isn’t a command from the compiler that makes the difference, but rather that Flathub sends a separate Locale file with the flatpaks and runtimes based on the user’s system locale. So setting the locale is done automatically by Flathub. By bypassing the Flathub installation of Gramps, the appropriate locale does not get sent to the user’s computer.
The workaround for the Gramps archived flatpaks at the gramps-project github was to add a command in the manifest to leave out separate-locales during the build process, so that the archive would have to use system settings.
Does that mean that is is harder to install specific languages when they are not the OS selection?
I’ve been installing English, French, German and Finnish on my Windows testbox. (Since those are the languages that some of my transcribed Notes include. I want the dictionaries and Date parsers for them.)
I have not verified that all system locales get installed for flatpaks. In my testing VM, I did install the Gramps flatpak while the system was in English and in the same session added the Debian system language pack for Spanish. Then I rebooted the VM, changed the system language to Spanish, and made sure that the Gramps flatpak displayed Spanish (although I think the Prerequisites Add-on stayed in English, everything else in Gramps was Spanish). So while I haven’t tested enough to give a solid answer, my understanding is that flathub sends locale data for all languages in the system. Here is a discussion about locales at Flathub