The complete localisation of Linux/ Unix is a quite difficult and time consuming task. At the moment this howto only covers the installation and usage of the Afghan keymaps.
The language is a essential part of a culture. A language can participate much better with the progress of the computer age it is supported by computer systems.
The United Nations Development Programme Country Office for Afghanistan had
specified in his December 2002 report three keyboard layouts (Dari, Pashto and southern Uzbek) for Afghanistan. Till February 2005 this key maps weren't supported by the Linux/ Unix (except Mac OS) operating systems.
I created a Dari, Pashto and southern Uzbek keymap to close this gap. The keymaps are free software; you can download, redistribute it and/ or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. If you have any improvements or suggestions please drop me a mail.
This HOWTO assumes that "xkb" is installed and that you have got access to the "setxkbmap" command (they are installed by default in most Linux/ Unix systems). The steps of this mini HOWTO were tested on a computer running under Debian Gnu/ Linux 3.1 . This HOWTO should also work (perhaps with small modifications) on all other Linux/ Unix systems.
user@linux:~$ cd /tmp
user@linux:/tmp$ wget http://alekozai.com/emal/doc/afghanKeymaps.tar.gz
user@linux:/tmp$ tar -xvzf afghanKeymaps.tar.gz
root@linux:~$ cp /tmp/afghanKeymaps/* /etc/X11/xkb/symbols/pc/.
The folder in which xkb keymaps are stored can vary depending on your system. Debian and Suse Linux store the keymaps in the folder "/etc/X11/xkb/symbols/pc/".
The available keymaps together with their descriptions are contained in the file "/etc/X11/xkb/rules/xfree86.lst". To make the new keymaps available under X add the following lines with a text editor to the "layout" section of this file.
fa_af Dari ps_af Pashto uz_af Southern Uzbek
To make the keymaps available in GNOME the following lines have to be added with a text editor to the file "/etc/X11/xkb/rules/xfree86.xml".
<layout> <configItem> <name>fa_af</name> <description>Dari</description> </configItem> <variantList/> </layout> <layout> <configItem> <name>ps_af</name> <description>Pashto</description> </configItem> <variantList/> </layout> <layout> <configItem> <name>uz_af</name> <description>Southern Uzbek</description> </configItem> <variantList/> </layout>
The keymap can be changed with the "setxkbmap" command followed by the layout name. See the following examples.
On a Dari or Pashto or southern Uzbek keyboard there are no latin letter's direct available. Depending on your keyboard settings it can get a little tricky to switch back to your original keymap. A simple trick is to set first your keymap e.g. to English and then afterwords change it to something else. You can then use the "up" key of your terminal to set your keymap back to English.
# Change to English keymap user@linux:~$ setxkbmap us # Change to Dari keymap user@linux:~$ setxkbmap fa_af # Change to Pashto keymap user@linux:~$ setxkbmap ps_af # Change to southern Uzbek keymap user@linux:~$ setxkbmap uz_af # Change back to English keymap (use the "up" key) user@linux:~$ setxkbmap us
Screen shot for the Dari keymap.
Screen shot for the pashto keymap.
In all major desktops (GNOME, KDE, XFce4 etc.) there are graphical programmes available for changing the keymap. Under GNOME the programme is called "Keyboard Indicator". This section only covers GNOME. If you are using a other desktops please refer to the programme documentation.
Click with the right mouse button on the GNOME panel. To add the "Keyboard Indicator" select with the left mouse button the item "+ Add to Panel" from the drop down menu.
Select with the left mouse button the item "Keyboard Indicator". Click afterwords with the left mouse button on "+ Add".
Now the "Keyboard Indicator" is added to the GNOME panel. To add further keymaps click with the right mouse button on the "Keyboard Indicator" and select with the left mouse button from the drop down menu the item "Open Keyboard Preferences".
In the "Keyboard Preferences" menu click with the left mouse button the register tab "Layouts". Select from the section "Available Layouts" the keymaps for "Dari", "Pashto", "Southern Uzbek".
The available keymaps can be changed for each application by clicking with the left mouse button on the "Keyboard Indicator" in the GNOME panel.