rednotebook icon indicating copy to clipboard operation
rednotebook copied to clipboard

Language setting does not change, though LANG is set

Open buscon opened this issue 2 years ago • 5 comments

Describe the bug Based on the documentation, it is possible to set the language used by rednotebook using environment variables. Even though I set the LANG environment variable with a different language than the default of my system (but which is available on my system), rednotebook keeps using the default en_US language

To Reproduce

  1. open a terminal
  2. run the following command: export LANG=it_IT.UTF-8; rednotebook
  3. rednotebook starts but the language is set to en_US it_IT is available as a language, i can select it inside rednotebook with the right mouse button

Expected behavior I expect rednotebook to use the language set in the LANG environment variable

Screenshots No relevant screenshots

Versions:

  • RedNotebook version 2.22
  • Operating system and version: Linux Mint 20.2, based on Ubuntu 20.04 LTS

Log output when reproducing bug There are no relevant logs related to the issue.

buscon avatar Jul 22 '21 19:07 buscon

This works for me: LC_CTYPE=de_DE /usr/bin/rednotebook

nobanzai avatar Sep 01 '21 19:09 nobanzai

@nobanzai thanks for your answer, though It does not work for me. I set to a different language than the en_US one (the default one) the following environmental variables: LANG LANGUAGE LC_CTYPE but rednotebook still uses the en_US language

buscon avatar Sep 08 '21 17:09 buscon

On Mittwoch, 8. September 2021 19:59:25 CEST buscon wrote:

@nobanzai thanks for your answer, though It does not work for me. I set to a different language than the en_US one (the default one) the following environmental variables: LANG LANGUAGE LC_CTYPE but rednotebook still uses the en_US language

Yep, you have to set it directly in the commandline you also start rednotebook. I use en_US as my default language, too. But running rednotebook with exactly the mentioned line is accepted by the program - at least for me.

Bye. Michael.

Michael Hirmke

nobanzai avatar Sep 08 '21 18:09 nobanzai

I do set the enviromental variables in the same commandline where I run rednotebook, but still, the default language does not change anyway.

Mistery!

buscon avatar Sep 08 '21 18:09 buscon

On Mittwoch, 8. September 2021 20:12:33 CEST buscon wrote:

I do set the enviromental variables in the same commandline where I run rednotebook, but still, the default language does not change anyway.

Mistery!

Indeed 8-<

Bye. Michael.

Michael Hirmke

nobanzai avatar Sep 08 '21 18:09 nobanzai

I experimented with this a bit and found the following on my Ubuntu system:

  • LANGUAGE sets the language for the interface (i.e., text on buttons, menus, etc.).
  • LANG and LC_CTYPE set the language for the spell checker.
  • LC_TIME sets the language for the date strings (weekday names, month names, etc.).

To set both LC_CTYPE and LC_TIME simultaneously, you can use LC_ALL instead.

jendrikseipp avatar Dec 28 '22 21:12 jendrikseipp

I experimented with this a bit and found the following on my Ubuntu system:

* LANGUAGE sets the language for the interface (i.e., text on buttons, menus, etc.).

* LANG and LC_CTYPE set the language for the spell checker.

* LC_TIME sets the language for the date strings (weekday names, month names, etc.).

To set both LC_CTYPE and LC_TIME simultaneously, you can use LC_ALL instead.

thanks for your comment! I confirm that setting LC_ALL fixes the issue. If I set only one of the ENV you mentioned above, it is not enough.

buscon avatar Apr 10 '23 18:04 buscon