Add ability to change locale
Closed this issue · 2 comments
thebitstick commented
I want the ability to have my GNOME in one language and my clock in another. Is that possible for an extension to do?
da2x commented
This extension only works with the clock at the top of GNOME. I'll not add specific settings for changing the locale for only this one part of the desktop.
You can set the date and time locale on your system by changing the LC_TIME
environmental variable on your system, however. Here are instructions for changing this on Ubuntu. Instructions vary by distro and you'll probably find instructions for your distribution elsewhere online.
shungo27 commented
- Open the Clock override settings.
- Set "Text to display insteed of the clock" to
${m[%-m]} %d ${w[%w]} %R
.${m[%-m]}
is the month and${w[%w]}
is the day of the week. - Add the following two lines under var settings;
const w = new Array('Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.');
const m = new Array('', 'Jan.', 'Feb.', 'Mar.', 'Apr.', 'May', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.');
- Rewrite
var FORMAT = settings.get_string("override-string");
to
var FORMAT = "`" + settings.get_string("override-string") + "`";
- Rewrite
var desired = Format.format(FORMAT, now);
to
var desired = eval(Format.format(FORMAT, now));
- Press alt + f2, type
r
, and press Enter to restart gnome-shell.
Note that this change will be reset when the Clock override is updated.