VSIDO Community

VSIDO Support => Scripts and How To's => How To's => Topic started by: Sector11 on February 11, 2013, 10:02:45 PM

Title: How To: Change the Default Locale
Post by: Sector11 on February 11, 2013, 10:02:45 PM
I found out quite by accident that VSIDO keeps the:

en_US.UTF-8 UTF-8


setting even though I told the installer to use

en_CA.UTF-8 UTF-8


So I went looking for a way to get my choice as the default.

It was a lot easier than I though:

Configuring Locales (http://people.debian.org/~schultmc/locales.html) - gave me what I needed.
Debian wiki - Locale (http://wiki.debian.org/Locale) - Interesting reading as well

All packages needed for this are installed in VSIDO by default (I believe, I've been wrong before).

Start with:
sector11 @ sector11
11 Feb 13 | 18:07:41 ~
         $ sudo dpkg-reconfigure locales
password for sector11:


First A Word of CAUTION: what you select below are the "locales" that will remain active in your system.

Using the bash alias "up" to update / dist-upgrade your system that 'removes' any locales that newly updated / installed programs may drag into your system will be removed.  This is where I saw that my 'en_CA.UTF-8' locale was being removed.

Hey, that's my locale, I want it!  ;)

So to continue: put an '*' in the locales you want to keep, you can choose multiple. And remove the '*' from locales you do not wish to have on your system.


Package configuration

┌──────────────────────────┤ Configuring locales ├──────────────────────────┐
│ Locales are a framework to switch between multiple languages and allow    │
│ users to use their language, country, characters, collation order, etc.   │
│                                                                           │
│ Please choose which locales to generate. UTF-8 locales should be chosen   │
│ by default, particularly for new installations. Other character sets may  │
│ be useful for backwards compatibility with older systems and software.    │
│                                                                           │
│ Locales to be generated:                                                  │
│                                                                           │
│    | | en_BW ISO-8859-1                                               ↑   │
│    | | en_BW.UTF-8 UTF-8                                              ▮   │
│    | | en_CA ISO-8859-1                                               ▒   │
│    |*| en_CA.UTF-8 UTF-8                                              ▒   │
│    | | en_DK ISO-8859-1                                               ▒   │
│    | | en_DK.ISO-8859-15 ISO-8859-15                                  ↓   │
│                                                                           │
│                                                                           │
│                    <Ok>                        <Cancel>                   │
│                                                                           │
└───────────────────────────────────────────────────────────────────────────┘



Screen 2:


Package configuration

┌──────────────────────────┤ Configuring locales ├──────────────────────────┐
│ Many packages in Debian use locales to display text in the correct        │
│ language for the user. You can choose a default locale for the system     │
│ from the generated locales.                                               │
│                                                                           │
│ This will select the default language for the entire system. If this      │
│ system is a multi-user system where not all users are able to speak the   │
│ default language, they will experience difficulties.                      │
│                                                                           │
│ Default locale for the system environment:                                │
│                                                                           │
│                                None                                       │
│                                en_CA.UTF-8                                │
│                                                                           │
│                                                                           │
│                    <Ok>                        <Cancel>                   │
│                                                                           │
└───────────────────────────────────────────────────────────────────────────┘




sector11 @ sector11
11 Feb 13 | 18:10:02 ~
         $ sudo dpkg-reconfigure locales
Generating locales (this might take a while)...
  en_CA.UTF-8... done
Generation complete.
sector11 @ sector11
11 Feb 13 | 18:12:24 ~
         $


And my  '/etc/default/locale' is a one liner:
LANG=en_CA.UTF-8

OK, I'm  8)

My thanks to drum for joining and reminding me I've wanted to put this up for a while now.
Title: Re: How TO Change the Default Locale
Post by: drum on February 12, 2013, 04:19:54 AM
^ great how-to Sector11
Title: Re: How TO Change the Default Locale
Post by: VastOne on February 13, 2013, 04:14:00 PM
Well done Sector11.. very detailed and informative

Nice!  ;D