How to set the Waybar clock in Spanish
I don't know how to set the Waybar clock to Spanish. I have tried with LC_TIME but it doesn't work. Could you indicate which file I should modify to be able to set the clock to Spanish?
You can set the timeformat in the dotfiles App.
But where do I configure it. In which file, or should I create a new one. I would appreciate your help. Thank you.
But where do I configure it. In which file, or should I create a new one. I would appreciate your help. Thank you.
How do you want the clock to look like? Can you share an example?
Now in the modules.json file I have this:
"clock": { "format": " {:%H:%M - %A}", "locale": "es_ES.UTF-8", "interval": 1, "on-click": "ags -t calendar", "tooltip": false },
But it keeps showing me the day of the week in English at the bar and I want it in Spanish.
Same here. I would like to have the day in fr_CA but it stays in english. Also same problem for locale folder names don't use xdg-document-portal , the scripts all use ~/Downloads but the name is not the same if you are using another locale. I have set: "locale": "fr_CA.UTF-8", in config with no success. A similar problem was open last year : https://github.com/Alexays/Waybar/issues/2694 . (Tried also fr_ca.utf-8/utf8/UTF8 with no success).
The linked issue from @PerfMonk has the solution.
For format, add the L after the first colon "format": "{:L ... }",
For format, add the
Lafter the first colon"format": "{:L ... }",
I tried that, but it does not work, and instead the L gets printed:
"clock": {
"locale": "es_MX.UTF-8",
"format": "{:L%a %d de %b %I:%M:%S}"
}
yields LSat 28 de Dec 12:01:32
Waybar 0.9.17 from Debian 12 if it helps.
It seems to be a Hyprland known problem.
Le sam. 28 déc. 2024 à 01:02, L. Manuel @.***> a écrit :
For format, add the L after the first colon "format": "{:L ... }",
I tried that, but it does not work, and instead the L gets printed:
"clock": { "locale": "es_MX.UTF-8", "format": "{:L%a %d de %b %I:%M:%S}"}
yields LSat 28 de Dec 12:01:32
Waybar 0.9.17 from Debian 12 if it helps.
— Reply to this email directly, view it on GitHub https://github.com/mylinuxforwork/dotfiles/issues/423#issuecomment-2564209207, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZAWI5XWRLIDQMS2RRFN32HY5I5AVCNFSM6AAAAABRQH2XNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRUGIYDSMRQG4 . You are receiving this because you were mentioned.Message ID: @.***>
--
Bernard Tremblay @.*** R: (418) 658-1411 C: (581) 988-1411
Le but de Linux est de gérer vos ressources et faire le travail, le but des OS propriétaire est de vous vendre d'autres licences...
Have you enabled all the needed languages in /etc/locale.gen and generated with locale-gen?
I tested it, if You do so, You can set:
"clock": {
"locale": "es_MX.UTF-8",
"format": "{:L%a %d de %b %I:%M:%S}"
}
You can set a lenguage globaly in /etc/locale.conf an override it per user in ~/.config/locale.conf
"locale": "es_MX.UTF-8", is not needed, if it is enabled in locale.conf, but the L ist needed to set it to the locale.
My locale is generated correctly. I have set keyboard layout canadian french. The total OS was installed with my locale and everything works fine. The waybar clock is correctly defined : "clock": { "timezone": "America/Toronto", "locale": "fr_CA.UTF-8", "format": "{:%H:%M - %A}", "interval":1, "on-click-right": "XDG_CURRENT_DESKTOP=GNOME gnome-calendar", "tooltip-format": "{:%Y %B}\n{calendar}", "format-alt": "{:%Y-%m-%d}" }, If I type the command in a shell (kitty), I get a correct answer : date "+%H:%M-%A" returns: "00:23-vendredi" wich is my correct current time and format. The problem appears only when waybar calls for the locale, it always returns an english day name.
I can't say anything more about it.
Regards, BT
Le jeu. 2 janv. 2025 à 04:27, Guido De Gobbis @.***> a écrit :
Have you enabled all the needed languages in /etc/locale.gen and generated with locale-gen? I tested it, if You do so, You can set:
"locale": "es_MX.UTF-8", "format": "{:L%a %d de %b %I:%M:%S}"}``` You can set a lenguage globaly in
/etc/locale.confan override it per user in~/.config/locale.conf"locale": "es_MX.UTF-8",is not needed, if it is enabled inlocale.conf, but theList needed to set it to the locale.— Reply to this email directly, view it on GitHub https://github.com/mylinuxforwork/dotfiles/issues/423#issuecomment-2567483449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZAWNE3U7RERTNPHEVPJL2IUBB3AVCNFSM6AAAAABRQH2XNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRXGQ4DGNBUHE . You are receiving this because you were mentioned.Message ID: @.***>
--
Bernard Tremblay @.*** R: (418) 658-1411 C: (581) 988-1411
Le but de Linux est de gérer vos ressources et faire le travail, le but des OS propriétaire est de vous vendre d'autres licences...
My locale is generated correctly. I have set keyboard layout canadian french. The total OS was installed with my locale and everything works fine. The waybar clock is correctly defined :
"clock": {
"timezone": "America/Toronto",
"locale": "fr_CA.UTF-8",
"format": "{:%H:%M - %A}",
"interval":1,
"on-click-right": "XDG_CURRENT_DESKTOP=GNOME gnome-calendar",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
If I type the command in a shell (kitty), I get a correct answer : date "+%H:%M-%A" returns: "00:23-vendredi" wich is my correct current time and format. The problem appears only when waybar calls for the locale, it always returns an english day name.
I can't say anything more about it.
Your keyboard layout isn't important.
It is important that fr_CA.UTF-8 is uncommented in /etc/locale.gen and generated with locale-gen.
Also important is that the variable LANG is set to fr_CA.UTF-8 in /etc/locale.conf.
The command locale should reflect this.
If this is the case, this configuration should be sufficient:
"clock": {
"timezone": "America/Toronto",
"format": "{:L%H:%M - %A}",
"interval":1,
"on-click-right": "XDG_CURRENT_DESKTOP=GNOME gnome-calendar",
"tooltip-format": "<big>{:L%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
All is correctly set. I have removed the "locale" line in the clock module (as it was before...) but the date is still showed in english. On recent systemd there is no /etc/locale.gen file, you must use localectl. It is correctly set as you can see here:
[root@fido etc]# localectl
System Locale: LANG=fr_CA.UTF-8
VC Keymap: ca
X11 Layout: ca
X11 Model: pc105
[root@fido etc]#
But the waybar clock still show "Sunday" in english instead of "Dimanche" in french. It's very mysterious .
Perhaps we also use different distros.
I use Arch and have de-DE.UTF-8 as default and also use Systemd.
Without the process with locale-gen it doesn't work for me either, but if I enter de-DE.UTF-8 and fr_CA.UTF-8 in the file /etc/locale.gen and then run locale-gen as root, I can change the clock in the waybar.
So if that doesn't work for you, or your distro doesn't support locale-gen, I don't know what to do right now.
I'm on Fedora 41 with gnome and hyprland installed. Modern distro using systemd will all eventually stop using locale.gen. It is now controlled by a systemd tool : localectl. see my locale here:
localectl status
System Locale: LANG=fr_CA.UTF-8
VC Keymap: ca
X11 Layout: ca
X11 Model: pc105
I have no /etc/locale.gen but there is a /etc/locale.conf (containing only : LANG="fr_CA.UTF-8").
The issue is not related to locale configuration but on waybar not using the selected locale within the clock widget.
Debian GNU/Linux 12 (bookworm) x86_64 Laptop 13 (AMD Ryzen 7040Series) A7
System Locale: LANG=es_ES.UTF-8
VC Keymap: (unset)
X11 Layout: es
X11 Model: pc105
Trying
"format": {:L%a %d %b %Y %H:%M:%S}
prints the 'L' character in front of the english formatted string
Removing this line:
"timezone": <Country>/<City>"
fixes the issue for me
I'm on SDT -06:00 however so I don't know if that would work for other time zones