How can I start an app in a different language in GNOME Builder

Hello,

I’m working on the translation of a GTK/GNOME app.

While I can build and install it using flatpak-builder on my computer, I find that it’s not always as straightforward as using GNOME Builder.

Is there a way to launch an app in a different language using GNOME Builder?

Thank you.

1 Like

This normally should be possible by adding the preferred language locale to the environment variable LC_ALL

Example:

$ LC_ALL=zh_CN.utf8 gnome-clocks

should open gnome-clocks in chinese locale.

How this is done in GNOME Builder is not clear. There is a way to add environment variables to the build environment, but I don’t see an option for adding environment variables to runtime environment, which is what is needed here.

@chergert: thoughts ?

1 Like

You can add it as a finish arg to your flatpak manifest. e.g. Something like:

"command" : "my_app",
    "finish-args" : [
        "--share=network",
        "--share=ipc",
        "--socket=fallback-x11",
        "--device=dri",
        "--socket=wayland",
        "--socket=pulseaudio",
        "--env=LC_ALL=de_DE.UTF-8"
    ],

Will start the app in German, assuming you have the German locale installed with Flatpak.

Thanks, It works with GNOME Builder.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.