Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

A remote installed application has some encoding problems and on my local machine it is running fine.

What is the best way to "copy" my locales to the remote machine?

The locales on my personal machine are configured like this:

$ locale
LANG=de_DE.UTF-8
LANGUAGE=de_DE:en
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
share|improve this question
    
a user-specific locale (for one user) or generally for the whole system? –  medigeek Sep 26 '12 at 15:46

2 Answers 2

up vote 10 down vote accepted

The easier way

  1. Export all locales into a file

    locale > import

  2. Open file and add export at the start of each line

  3. Make it executable with the command chmod ugo+rx import

  4. Copy to desired profile and execute ./import

share|improve this answer
    
(a) "Copy to desired profile" -- does this mean to move the file to the home of the user (b) Is this a permanent solution? –  medigeek Sep 27 '12 at 5:06

You can set locale manually using update-locale:

sudo update-locale LANG=de_DE.UTF-8 LC_MESSAGES=POSIX

Read the man page for more information.

Alternatively, you can manually change your system's locale entries by modifying the file /etc/default/locale.

For example on a German system, to prevent system messages from being translated, you may use:

LANG=de_DE.UTF-8
LC_MESSAGES=POSIX

Note: changes take effect only after a fresh login.

Source: https://help.ubuntu.com/community/Locale

share|improve this answer
    
I think update-locale needs sudo. Personally I like your alternative solution, maybe you should make it a primary one. :) –  medigeek Sep 26 '12 at 15:45
    
updated it!! :) –  green7 Sep 26 '12 at 15:47
    
"perl: warning: Setting locale failed." .. How to fix this ? –  Panique Jan 14 '13 at 15:43
2  
Run the following command: sudo dpkg-reconfigure locales. –  green7 Jan 16 '13 at 11:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.