LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-31-2014, 06:51 PM   #1
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Rep: Reputation: 210Reputation: 210Reputation: 210
How do I change the locale in Ubuntu?


Hello. I'm using Ubuntu 13.10. During the install I indicated that I was from Canada, so I assumed the locale would be set to en_CA. But everything seems to be en_US (spelling wise). I'm thinking perhaps not many programs accommodate en_CA. Anyway, I'm wondering how I can change the locale (to change the program spellings) to en_GB.

When I used Vector Linux, which is based on Slackware, I simply changed the file /etc/profile.d/lang.sh by commenting out en_US and adding en_GB. I can't find this file in Ubuntu, however. So, does anyone know how I can change the locale? I'm using XFCE.
 
Old 03-31-2014, 08:57 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

for a system wide change you can reconfigure the locales package. Eg
Code:
sudo dpkg-reconfigure locales
This will generate additional locales and set the default locale (which is kept in /etc/default/locale).

Not sure if xfce4-session provides a built in way to do this on a per user basis but setting the LANG environment variable should do the trick.

Cheers,

Evo2.

PS. The last Ubuntu version that I did this on was 10.04, so things may have changed with 13.10.
 
Old 03-31-2014, 11:36 PM   #3
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by evo2 View Post
Hi,

for a system wide change you can reconfigure the locales package. Eg
Code:
sudo dpkg-reconfigure locales
This will generate additional locales and set the default locale (which is kept in /etc/default/locale).

Not sure if xfce4-session provides a built in way to do this on a per user basis but setting the LANG environment variable should do the trick.

Cheers,

Evo2.

PS. The last Ubuntu version that I did this on was 10.04, so things may have changed with 13.10.
Should work fine. Works under Sid.
 
Old 04-01-2014, 08:27 AM   #4
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Original Poster
Rep: Reputation: 210Reputation: 210Reputation: 210
Okay, I did that, but I'm not sure if it accomplished anything.

Code:
mark@mark-OptiPlex-755:~$ sudo dpkg-reconfigure locales
[sudo] password for mark: 
Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... up-to-date
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
mark@mark-OptiPlex-755:~$
 
Old 04-01-2014, 02:14 PM   #5
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Well that is interesting. I don't know if you got it right either.

You never did say what you wanted.
 
Old 04-01-2014, 05:09 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

you may have your minimum debconf priority set too high to be prompted to change the default locale. Try
Code:
sudo dpkg-reconfigure -plow locales
You can change the debconf frontend minimum priority by configuring the debcobf package. Eg
Code:
sudo dpkg-reconfigure -plow debconf
HTH,

Evo2.
 
Old 04-01-2014, 05:43 PM   #7
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Original Poster
Rep: Reputation: 210Reputation: 210Reputation: 210
Quote:
Originally Posted by mark_alfred View Post
Hello. I'm using Ubuntu 13.10. During the install I indicated that I was from Canada, so I assumed the locale would be set to en_CA. But everything seems to be en_US (spelling wise). I'm thinking perhaps not many programs accommodate en_CA. Anyway, I'm wondering how I can change the locale (to change the program spellings) to en_GB.
Quote:
Originally Posted by widget View Post
You never did say what you wanted.
Odd. I thought "I'm wondering how I can change the locale (to change the program spellings) to en_GB" was as clear as day. Oh well.

It's currently set to en_CA, but, as I said before, this still seems to default to en_US for many programs. Should I edit the /etc/default/locale file?
 
Old 04-01-2014, 05:55 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by mark_alfred View Post
It's currently set to en_CA, but, as I said before, this still seems to default to en_US for many programs. Should I edit the /etc/default/locale file?
No, see my post.

Try reonfiguring debconf- you may have the front end set to "non-interactive". If so change it to something else. Eg dialog.

Evo2.
 
Old 04-01-2014, 06:01 PM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by mark_alfred View Post
Odd. I thought "I'm wondering how I can change the locale (to change the program spellings) to en_GB" was as clear as day. Oh well.
many programs do not take notice of the LOCALE, so this may not help you much. For example emacs does not care if I use en_CA, en_UK or en_NZ, it still tries to use US (miss)spelling by default. I'm not aware of a general solution for all programs.

Evo2.
 
Old 04-02-2014, 02:42 PM   #10
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572

Original Poster
Rep: Reputation: 210Reputation: 210Reputation: 210
Yeah, I just thought that more programs may notice en_GB (en_UK?) over en_CA. It's fine with some programs, but many others don't give the Canuck one much heed, so I thought perhaps Great Britain would gain more notice. Oh well, I'm not overly worried.

Last edited by mark_alfred; 04-02-2014 at 09:37 PM.
 
  


Reply

Tags
language, locale, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change system locale without reboot fazorboy Linux - Server 2 08-03-2012 04:05 AM
How to change the locale by setting the system default locale letdoit Slackware 6 08-18-2011 03:34 AM
how to change keyboard locale using java in linux linus_trivaldo Programming 1 06-02-2009 07:45 AM
How to change system wide locale? Tux-Slack Slackware 1 07-09-2007 07:34 AM
Change locale for an application? codec Linux - General 0 04-18-2004 05:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration