Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow the standard way to choose the date locale in reports #136

Open
tanius opened this issue Jul 19, 2022 · 0 comments
Open

Follow the standard way to choose the date locale in reports #136

tanius opened this issue Jul 19, 2022 · 0 comments

Comments

@tanius
Copy link
Contributor

tanius commented Jul 19, 2022

Currently, the following will start tom-ui with the date format in reports switched to German:

LC_ALL=en LC_TIME=en LANG=de tom-ui

So it seems that tom-ui evaluates the LANG environment variable directly to choose the date locale based on that.

This does not follow the rather convoluted standard practice for Linux locale switching, where LC_TIME would take preference over LANG, andLC_ALL would take preference over LC_TIME. (For messages, there would also be LANGUAGE overriding LC_ALL but it is not relevant for the date locale – see the details.)

That standard practice is already used by Qt's QLocale at least for the locale of messages – compare my analysis. So probably, some QLocale method can be used to detect the date locale "the standard way".

Additional note: Qt does evaluate the LC_TIME enviroment variable separately indeed. On my system I use by default LANGUAGE=en LC_ALL= LC_TIME=de_DE.UTF-8 LANG=en_US.UTF-8 and get German date chooser widgets in tom-ui as intended already. Just not yet a German date format in tom-ui's reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant