Author Topic: language switcher? <SOLVED>  (Read 1226 times)

Offline imageraw

  • Jr. Member
  • **
  • Posts: 28
language switcher? <SOLVED>
« on: July 12, 2012, 06:43:50 AM »
hi everyone, just installed Pclinuxos LXDE on my ancient laptop and I love it!

there's just one thing I can't figure out how to fix: the language switcher. I added "keyboard layout switcher" to the taskbar and then went to "configure your computer>hardware>keyboard". It says "set your keyboard layout" and not "layouts"...I can't see an option to add more languages, am I looking in the wrong place?

bottom line, all I need to do is to switch between English and Arabic while on a browser or libreoffice doc. I was able to do that in another distro by adding Arabic to the keyboard, and after downloading xfce4-xkb-plugin I could click on the "keyboard layout switcher" to switch English to Arabic back and forth...

can you please help? thank you
« Last Edit: July 13, 2012, 04:30:26 AM by imageraw »

Offline Loles

  • Jr. Member
  • **
  • Posts: 46
  • Nada como PCLOS
Re: language switcher?
« Reply #1 on: July 12, 2012, 07:47:49 AM »
Hi and welcome to the forum!

Updating your system with Synaptic will install a program called addlocale, this program will translate PCLOS to your local language adding your local to the english default language. Then you can update with FreeOffice Manager to your local language too. But about switching keyboard settings I can't help much. I'm a newbie too, but I think you took the right steps.
Try adding your local language to the keyboard after you have updated the system to locale language. Most probably you will have your local option now. You can also reed this post:

http://www.pclinuxos.com/forum/index.php/topic,87702.0.html

and see if it helps.

greetings
« Last Edit: July 12, 2012, 08:29:53 AM by Loles »
Loles

Dell XPS420 - 3.2.18-pclos2.bfs 64bits LXDE
‎Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
ATI Radeon HD 3870
‎Intel 82801I (ICH9 Family) HD Audio Controller
‎PLDS DVD+-RW DH-16A6S
4GB RAM

Offline imageraw

  • Jr. Member
  • **
  • Posts: 28
Re: language switcher?
« Reply #2 on: July 12, 2012, 08:10:44 AM »
Thanks Loles.

I did as you suggested, and it worked, except that...once I add Arabic (AR), the main keyboard language turns from UK English (GB) to US English (US) (on the language switcher on the taskbad). Typing confirms this: I'm now on a US keyboard (which makes no sense as I have a UK keyboard and GB is my locale). Does Pclinuxos present some kind of "super-locale" (US) by any chance?

Offline Loles

  • Jr. Member
  • **
  • Posts: 46
  • Nada como PCLOS
Re: language switcher?
« Reply #3 on: July 12, 2012, 08:45:59 AM »
in that case perhaps you should add the english UK language to your keyboard settings, and to FreeOffice in Writer->tools->options too.
Loles

Dell XPS420 - 3.2.18-pclos2.bfs 64bits LXDE
‎Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
ATI Radeon HD 3870
‎Intel 82801I (ICH9 Family) HD Audio Controller
‎PLDS DVD+-RW DH-16A6S
4GB RAM

Offline imageraw

  • Jr. Member
  • **
  • Posts: 28
Re: language switcher?
« Reply #4 on: July 12, 2012, 09:01:15 AM »
if I add GB to the keyboard settings AR disappears...in other words, AR can be added in combination with US but not with GB. Which makes me think that US English is dominant in this OS (?)

GB is already my locale. I don't really understand what you mean by FreeOffice in Writer. I seem to recall it's possible to switch to a different alphabet system on Open/LibreOffice, but that won't do: I need to be able to switch wherever I am - browser, writer, etc.


Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: language switcher?
« Reply #5 on: July 12, 2012, 09:09:57 AM »
See if any of this helps. For your situation, you'll need to change

Exec=setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ar

to

Exec=setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll gb,ar

I have not tried it. The poster for that thread used Arabic and US. See if GB will work.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline imageraw

  • Jr. Member
  • **
  • Posts: 28
Re: language switcher?
« Reply #6 on: July 12, 2012, 10:19:03 AM »
thank you for this. I'm having problems with saving the file though as I can't find the directory  ~/.local/share/applications/Keyboard-toggle.desktop mentioned in the post you suggested...

Switching between US/AR does work though, and I'm wondering if my problem is of a different nature. Spontaneously I'm wondering if GB can take over and replace US system-wide in Pclinuxos. Just a thought.

Offline Loles

  • Jr. Member
  • **
  • Posts: 46
  • Nada como PCLOS
Re: language switcher?
« Reply #7 on: July 12, 2012, 10:38:59 AM »
Also you can check in Synaptic there is a program called acon Arabic support for Linuxconsole  ;)
Loles

Dell XPS420 - 3.2.18-pclos2.bfs 64bits LXDE
‎Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
ATI Radeon HD 3870
‎Intel 82801I (ICH9 Family) HD Audio Controller
‎PLDS DVD+-RW DH-16A6S
4GB RAM

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: language switcher?
« Reply #8 on: July 12, 2012, 10:42:47 AM »
I'm having problems with saving the file though as I can't find the directory  ~/.local/share/applications/Keyboard-toggle.desktop mentioned in the post you suggested...

You have to create it. The contents are in that post, but I'll post it again with gb and ar. Copy and paste this into a text editor:

[Desktop Entry]
Name=Keyboard-toggle
GenericName=
Comment=Toggle between 2 layouts with Alt-Shift
Encoding=UTF-8
Exec=setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll gb,ar
Icon=/usr/share/icons/gnome/48x48/devices/keyboard.png
Terminal=false
Type=Application
Categories=GTK;GNOME;Application;Utility;System;Monitor;X-MandrivaLinux-CrossDesktop
StartupNotify=false


Save the file as ~/.local/share/applications/Keyboard-toggle.desktop. (~ = your home directory. .local is a hidden directory in your home folder.) You will then have a menu entry of Keyboard-toggle in More Applications > Monitoring.


Spontaneously I'm wondering if GB can take over and replace US system-wide in Pclinuxos. Just a thought.


Others do. I don't see why you cannot. Open PCLinuxOS Control Center. Hardware in the left pane, Set up the keyboard layout in the right pane. Pick your language and keyboard type. After saving your prefs, pick System in the left pane and Manage localization for your system in the right pane.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline imageraw

  • Jr. Member
  • **
  • Posts: 28
Re: language switcher?
« Reply #9 on: July 12, 2012, 12:09:32 PM »
ok: now I have a file sitting at /home/myname/.local/share/applications/Keyboard-toggle.desktop. The file name is "Keyboard-toggle.desktop".

a) it doesn't show in More Applications > Monitoring;
b) the procedure " PCLinuxOS Control Center. Hardware in the left pane, Set up the keyboard layout in the right panel, etc" doesn't lead me anywhere: once I add Arabic, US appears at the language switcher and replaces GB. Alt-Shift works (as it worked before, hence my previous doubt);
c) when I go to system, the localization windows show that my locale is GB...
d) if I re-set the keyboard language to GB, alt-shift (or the switcher on the taskbar) stops working.

I tried re-booting at different stages, to no avail. The other post mentions a "On the e17 desktop, go to Settings > Settings Panel (...)" which I don't understand.

Am I doing something wrong?

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: language switcher?
« Reply #10 on: July 12, 2012, 12:58:28 PM »
ok: now I have a file sitting at /home/myname/.local/share/applications/Keyboard-toggle.desktop. The file name is "Keyboard-toggle.desktop".

a) it doesn't show in More Applications > Monitoring;

I just copied the desktop file as shown and saved it. Here is the result (click the image to see it full size):




The other post mentions a "On the e17 desktop, go to Settings > Settings Panel (...)" which I don't understand.


The other post was for someone who is using the e17 desktop. I will install LXDE to a VM and see if I can setup what you are trying to get working. It will be several hours before I can post any results.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline imageraw

  • Jr. Member
  • **
  • Posts: 28
Re: language switcher?
« Reply #11 on: July 12, 2012, 03:14:28 PM »
thanks tons djohnston. I appreciate that.
Had a look at your screenshot. I definitely don't have a keyboard-toggle at monitoring.

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: language switcher?
« Reply #12 on: July 12, 2012, 03:26:47 PM »
Had a look at your screenshot. I definitely don't have a keyboard-toggle at monitoring.

Okay, I just figured out why. Change the Categories= line in the desktop file to:

Categories=GTK;System;Monitor;X-MandrivaLinux-System-Monitoring

I'm still working on the rest.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: language switcher?
« Reply #13 on: July 12, 2012, 03:39:21 PM »

I added "keyboard layout switcher" to the taskbar


What package did you install? Was it setxkbmap? How did you add it to the taskbar?
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: language switcher?
« Reply #14 on: July 12, 2012, 04:32:20 PM »
Here's what I have done so far. I did not run addlocale (More Applications > Configuration > Localization Manager) at all. I already had locales-en package installed. I opened Synaptic and installed locales-ar. setxkbmap was already installed.

1. Opened PCLinuxOS Control Center. System > Localization. Selected English, then United Kingdom.
2. In PCLinuxOS Control Center. Hardware > Set up the keyboard layout. Selected UK keyboard and 105 key (Intl) PC.
3. Rebooted.
4. Created ~/.local/share/applications/Keyboard-toggle.desktop file with text editor. Correct contents are:

[Desktop Entry]
Name=Keyboard-toggle
GenericName=
Comment=Toggle between 2 layouts with Alt-Shift
Encoding=UTF-8
Exec=setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll gb,ar
Icon=/usr/share/icons/gnome/48x48/devices/keyboard.png
Terminal=false
Type=Application
Categories=GTK;System;Monitor;X-MandrivaLinux-System-Monitoring
StartupNotify=false


5. Launched the Keyboard-toggle program from More Applications > Monitoring.
6. Entered some English and Arabic text (shown below) in the Leafpad editor, using Alt-Shift to toggle between the two languages.



Click the image to see it full size. Gotta go fix supper. I'll be back later. Fire away with any questions you may have.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378