For this “How To” I will refrain from using any CLI command.
I grew font of using the ZA keyboard layout from my early Linux days. The reason is that it gives me easy access to characters I need in Afrikaans (like ë and é ) as well as German (like ü, ä, ö, and last but not least ß)
In LXDE there is no GUI way to do this, not for ZA and I would imagine not for some others. In the PCLinuxOS Control Center the ZA layout does not feature. So what to do?
1. Go to Menu > File Tools > File Manager Super User
2. In the address bar type /etc/xdg/lxsession/LXDE/
3. Open the file “autostart”
and add the following : setxkbmap -layout "za,us"
4. Save the file, log out and log in
The first layout in the command will be the default one, in my case “za”.
Now we add the “Keyboard Layout Switcher” to our taskbar:
1. Right-click on your taskbar
2. Choose “Add / Remove Panel Items”
3. Choose “Add”
4. Choose “Keyboard Layout Switcher”
If you choose a setting like mine you will see that the US setting has a neat little US flag, the ZA doesn't have that, it just says “ZA”. In order to give it one you need to find and download a ZA flag from somewhere. I got mine from here:http://linuxgazette.net/gx/flags/ZA.png
It needs to be 60x40 pixels in size and must be a png file. You also have to make sure that the country code is correct and in lower case in the file name (in my case za.png). The directory where this flag has to end up is:/usr/share/lxpanel/images/xkb-flags
You will not be able to download it directly to this root directory. Download it somewhere possible and copy it to the desired location using your Super User File Manager and rename it if necessary.
Now you should have your desired setting in your taskbar with the flag of your country.
Small things is what keeps me loving Linux!