LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-09-2007, 12:56 PM   #1
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Slackware 12 - Setting locale - english language, koi8-r encoding.


Hello.
I'm looking for a way to set system locale to english and encoding to koi8-r. I just want output from all programs to be in english while being able to use koi8-r from command-line and anywhere. The problem is that some programs uses LANG variables to determine locale and encoding and they use it in different way.
Currently /etc/profile.d/lang.sh has following content (I've removed comments):
Code:
#!/bin/sh

export LANG=ru_RU.KOI8-R
export LC_MESSAGES=en_EN
export LC_COLLATE=C
This works mostly perfect but some programs still give me russian output. (for example, man prints messages in russian.)

I've tried setting LANG to something like "en_EN.KOI8-R", but while this works for most programs it breaks some other programs (perl starts complaining about setlocale problems, wine applications render garbage instead of russian letters, etc).

Basically I need this to make all help files and menus to be displayed in english, while commonly used encoding will be koi8-r. How can I do that?

Thanks.

P.S. I could just remove all russian help files, but there is another user on that machine and he will need those files.
 
Old 07-10-2007, 06:23 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
export LC_MESSAGES=en_EN
This is wrong. There is no locale en_EN. You can use en_US or run
Code:
locale -a
to see the available locales that suit your needs.
 
Old 07-10-2007, 08:09 PM   #3
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202

Original Poster
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by bathory
This is wrong. There is no locale en_EN. You can use en_US
Well, I'll try to change it to en_US, but system didn't complain about anything when en_EN was set as the only locale.

Quote:
Originally Posted by bathory
or run
Code:
locale -a
to see the available locales that suit your needs.
According to that list, KOI8-R is supported only by ru_RU.
 
Old 07-12-2007, 05:50 AM   #4
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202

Original Poster
Blog Entries: 3

Rep: Reputation: 62
Changing LC_MESSAGES to en_US didn't change anything - it works just like with en_EN. Some programs still prints output russian language.Any more ideas?
 
Old 07-12-2007, 06:14 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
The language that a command uses for output is controlled from LC_MESSAGES. To test this run:
Code:
export LC_MESSAGES=en_EN
man non-existent-command

export LC_MESSAGES=en_US
man non-existent-command
In the first case you should get the output in russian (because of the LANG that is used) and in the second case you'll have the output in english.
 
Old 07-12-2007, 06:24 AM   #6
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202

Original Poster
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by bathory
The language that a command uses for output is controlled from LC_MESSAGES. To test this run:
Well, I'm very sorry for previous post - almost everything works perfectly now, I just didn't notice it because of one java app, that selected russian interface automatically (OmegaT).

Russian language still appears in some places (some qt applications), but otherwise everything is fine. Thanks for the help, problem mostly solved.
 
  


Reply



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
Using IIIMF Chinese in English locale rykel Fedora 112 10-03-2006 08:01 PM
LANGUAGE locale setting Murdock1979 Debian 1 02-15-2006 07:49 AM
Locale and language setting stefaandk Linux - General 2 07-10-2005 11:08 PM
Language/locale setting val54321 Linux - Newbie 3 05-18-2005 07:26 AM
English / Danish Locale settings TroelsSmit Linux - Newbie 2 05-21-2004 02:26 AM

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

All times are GMT -5. The time now is 08:49 AM.

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