2

I want to use the en_US locale but I want to change the first day of week from Sunday to Monday. I have found a way to do this for older versions of Ubuntu but it seems that the configuration has changed recently with Ubuntu 22.04.

When I open /usr/share/i18n/locales/en_US I see the following under LC_TIME:

LC_TIME
abday   "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
day "Sunday";/
    "Monday";/
    "Tuesday";/
    "Wednesday";/
    "Thursday";/
    "Friday";/
    "Saturday"

week 7;19971130;1 abmon "Jan";"Feb";/ "Mar";"Apr";/ "May";"Jun";/ "Jul";"Aug";/ "Sep";"Oct";/ "Nov";"Dec" mon "January";/ "February";/ "March";/ "April";/ "May";/ "June";/ "July";/ "August";/ "September";/ "October";/ "November";/ "December"

Can I simply change the order of abday and day? What is week and do I need to change it also?

Is this even the correct way to do it?

  • $ less /usr/share/i18n/locales/sv_SE -> first_weekday 2 just before END LC_TIME - copy en_US to a new file, then look at https://superuser.com/a/1750342/346288 to see how to enable it. – Hannu Feb 26 '23 at 09:32
  • @Hannu that didn't work for me. I added first_weekday 2 just before END LC_TIME but the the calendar still shows Sunday as the first day. I logged out and back in after that. – Martin Zeltin Feb 26 '23 at 11:53
  • Wicked, I know I had that working - it isn't now, can't re-create what I wrote. :-( – Hannu Feb 26 '23 at 18:33
  • 1
    @Hannu: That superuser answer does not work since the new locale name is neither in /etc/locale.gen nor /usr/share/i18n/SUPPORTED. But besides that, a locale name which doesn't follow the pattern ll_CC.UTF-8@modifier is deemed to be problematic. – Gunnar Hjalmarsson Feb 26 '23 at 20:31

1 Answers1

3

I would edit the existing locale directly.

  1. Open /usr/share/i18n/locales/en_US for editing.

  2. Add the line

    first_weekday 2
    

    right before the line

    END LC_TIME
    
  3. Save.

  4. Generate the modified locale:

    sudo locale-gen en_US.UTF-8
    
Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94