Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
English and Russian
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Sat Sep 01, 2007 12:51 am    Post subject: English and Russian Reply with quote

Hello all,

I would like to get my Gentoo installation up and running with one little addon. I would like to be able to read and type using both English and Russian (cyrillic) subsets. Basically, I would like to be able to switch back and forth between using an English keyboard and a Russian keyboard. I don't need to have all my programs in Russian, but I would like to be able to type. I'm thinking that I just need to add an entry for Russian in locale.gen, is that correct? Also, is there a list of the entries, so that I make sure I get it right? Lastly, if I would want to switch back and forth between the two (under KDE), how would I do that? I know that when I'm on my Window$ machine, there is an icon that I can toggle between EN and RU.

Thanks preemptively,
Zach
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---


Last edited by NathanZachary on Wed Sep 05, 2007 8:13 pm; edited 2 times in total
Back to top
View user's profile Send private message
xorserer
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2004
Posts: 119
Location: Israel

PostPosted: Sat Sep 01, 2007 1:09 am    Post subject: Reply with quote

it's really very simple.

i personally use GNOME, but i know KDE is very similar.
i type in both english and hebrew, and all i had to do is go to keyboard preferences, add another keyboard layout (layout == language you type in),
and then choose which key combination will switch between them.
if i remember correctly, you'll find it somewhere under "keyboard" in the kde control center...

other than that i didn't have any problem with locales and such (but maybe because i'm using a unicode system)

one thing to bear in mind is that if you mount a different filesystem, you have to pass mount the correct option (about charset) so that you'll see the filenames as they should be.
here are my relevant /etc/fstab lines:
Code:
#/dev/sda7              /mnt/Backup     ntfs            noauto,ro,user,umask=0222,nls=utf8                              0 0
/dev/sda7               /mnt/Backup     ntfs-3g         noauto,user,umask=0222,locale=en_US.utf8                                0 0

_________________
Prescott-2.8GHz | ThermalTake SilentTower | Asus P4P800-Deluxe | 1536mb | 7600GS | Gentoo
ThinkPad T41 | Pentium-M 1.5GHz | 1024mb | Windows XP
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Sat Sep 01, 2007 1:45 am    Post subject: Reply with quote

Well that does seem quite simple. I thought I would have to at least add the locale to locale.gen. I'll try the method you suggested when I get everything up to date (emerge -uD world can take quite some time). :)

Thanks again, and I'll report back.
--Zach
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sat Sep 01, 2007 2:42 am    Post subject: Reply with quote

Yeah, I think that running locale-gen maybe require to recompile GCC with the new set of locales...Or maybe I'm wrong ?
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Sat Sep 01, 2007 4:57 am    Post subject: Reply with quote

I can't seem to figure out what the actual strings would be for the locale.gen file. Is there a listing of them and appropriate syntax somewhere?
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
vadik56
n00b
n00b


Joined: 14 Feb 2006
Posts: 70

PostPosted: Sat Sep 01, 2007 5:21 am    Post subject: Reply with quote

Here is my locale.gen:
Code:

en_CA.UTF-8 UTF-8
en_CA ISO-8859-1
fr_CA UTF-8
ru_RU UTF-8
Back to top
View user's profile Send private message
LXj
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2005
Posts: 107

PostPosted: Sat Sep 01, 2007 10:34 am    Post subject: Reply with quote

You have to add something to locale.gen ONLY if you want your programs to be translated to Russian. But you said you don't want that.

So don't add anything to locale.gen. This is very simple: you just add language layout in KDE/Gnome or in xorg.conf.

Linux is never overcomplicated ;)
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Sat Sep 01, 2007 4:09 pm    Post subject: Reply with quote

Okay, but when you say that you add the information to locale.gen to get programs translated into Russian, how would it know when to use English and when to use Russian? I understand that to use the keyboard to type in either, I just set it in KDE though. :)
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Mon Sep 03, 2007 4:13 pm    Post subject: Reply with quote

Also, I found at the end of the KDE guide that you can add LINGUAS="" to your /etc/make.conf. Considering that KDE uses English by default, I would imagine that you only put additional language in there, right? So, I would put:

Code:

LINGUAS="ru"


NOT:

Code:

LINGUAS="en ru"


The reason I'm asking is because I was looking to emerge OpenOffice and I noticed that the last package, which is actually app-office/openoffice-2.2.1 says LINGUAS="-en -ru...". So, if I only have ru listed in my LINGUAS variable, will it ONLY install in Russian, or will it default to English and also have Russian available?

Thanks,
Zach
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
xorserer
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2004
Posts: 119
Location: Israel

PostPosted: Mon Sep 03, 2007 10:04 pm    Post subject: Reply with quote

you'll want to put both en & ru in there
Code:
LINGUAS="en ru"


(i'm not sure about KDE, but other programs also read this variable, and may lose english if there's no en)
_________________
Prescott-2.8GHz | ThermalTake SilentTower | Asus P4P800-Deluxe | 1536mb | 7600GS | Gentoo
ThinkPad T41 | Pentium-M 1.5GHz | 1024mb | Windows XP
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Tue Sep 04, 2007 12:57 am    Post subject: Reply with quote

Ah, well that sounds good then. I'll do that and then merge the longest compilation I know of...OpenOffice. :P
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
Deem3n
n00b
n00b


Joined: 15 Jun 2007
Posts: 20

PostPosted: Tue Sep 04, 2007 10:26 am    Post subject: Re: English and Russian Reply with quote

gentoo_zach wrote:
Basically, I would like to be able to switch back and forth between using an English keyboard and a Russian keyboard. I don't need to have all my programs in Russian, but I would like to be able to type.

Just alter your xorg.conf as follows:
Code:

//cutted
...
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option  "AutoRepeat"    "500 30"
        Option "XkbModel"       "pc105"
        Option "XkbLayout"      "us,ru(winkeys)"
        Option "XkbOptions"     "grp:alt_shift_toggle, grp_led:scroll"
EndSection
....
//cutted

If you know russian, this might help you
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Tue Sep 04, 2007 3:48 pm    Post subject: Reply with quote

WOW, that wiki page was excellent! Thank you for the link. That will make switching back and forth quite simple. :)
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2605

PostPosted: Wed Sep 05, 2007 8:16 pm    Post subject: Reply with quote

Okay, sorry to open this thread again. However, I want to know one more thing bout the LINGUAS option. If I merge OpenOffice, K3B, AmaroK, or other programs that support LINGUAS, how will I switch back and forth between the two languages? Will all the programs magically know to use Russian when I change to Russian in my KDE Control Panel, or will I have to set each program individually every time I switch back and forth? If all the programs will switch automatically based on my language/regional settings in the KControl Panel, then I'll merge all these programs with both languages in LINGUAS. Otherwise, I would rather just stick to English.

Thanks again,
Zach
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum