termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.02k stars 2.99k forks source link

XFCE Clock set first day of the week (set system locale) #20684

Closed testman42 closed 2 months ago

testman42 commented 2 months ago

My setup is XFCE4 desktop being displayed through Termux-X11. The primary issue that I am facing is that I am unable to set the calendar in XFCE4 Clock applet to use Monday as the first day of the week. As screenshot below shows, there does not seem to be any relevant option in the applet settings.

After searching for the solution on the internet, I came across many answers for regular desktop Linux, which claim that solution here is to change the system locale through localectl command or some other way. However, packages locale and localectl do not seem to be available through the Termux package manager.

Also relevant: running echo $LANG returns en_US.UTF-8. I assume that this is the Termux default? Also the issue #19646 and the discussion #18297 seem to be somewhat related to this issue.

What would be the best way to change the locale and therefore change the way calendar gets displayed?

Screenshot_2024-06-26_17-25-46

IntinteDAO commented 2 months ago

I assume that this is the Termux default?

I think it's sadly Android Bionic default variable and Termux can't change it.

sylirre commented 2 months ago

running echo $LANG returns en_US.UTF-8. I assume that this is the Termux default?

We have no variants for something else suitable. See https://github.com/aosp-mirror/platform_bionic/blob/8cbea9196765684bc65c2a495a4f785de5b7c46e/libc/bionic/locale.cpp#L109-L115:

static bool __is_supported_locale(const char* locale_name) {
  return (strcmp(locale_name, "") == 0 ||
          strcmp(locale_name, "C") == 0 ||
          strcmp(locale_name, "C.UTF-8") == 0 ||
          strcmp(locale_name, "en_US.UTF-8") == 0 ||
          strcmp(locale_name, "POSIX") == 0);
}

That makes possible to select only en_US.UTF-8 (most suitable), C.UTF-8, C or POSIX.