I am a developer of Safe Eyes (an app that reminds you to blink eyes to prevent eye strain), and someone requested a feature that they want to open the app in Spanish, while the system language for all other apps is set to be English.
The app has already been translated to many languages, and would change its language if the system language is changed to Spanish.
When the Spanish language pack is already installed, is there any way the app can be launched in a Spanish while the system language is still English? Maybe with some environment variable while running the app?
In case you need to test the app to provide an answer, you can use the official PPA in Ubuntu 24.04 (or use the package from official repositories on previous versions of Ubuntu), as the official repository version in broken in 24.04:
sudo add-apt-repository ppa:safeeyes-team/safeeyes
And sudo apt install safeeyes
Enable Spanish Locale
Go to Settings > System > Region and Languages > Manage Installed Language > Install / Remove Languages. Select Spanish.
Use the
LANG
Variable to start Safe Eyes from the terminal:The configuration should now be in Spanish:
The breaks should also be in Spanish:
Make Spanish the default
Open the app called Startup Applications and look for Safe Eyes:
Select Safe Eyes from the left panel and Click on the Edit button on the right. Add
LANG=es_ES.UTF-8
to the Command section beforesafeeyes
as shown below:Save and close the app. Logout and log back in to automatically start Safe Eyes in Spanish.
Hope this helps