Note: The instructions in this guide are specific to Gentoo distributions only and may/may not work for others. This guide is also work-in progress and will be updated or modified if something new comes along. Last updated: 8 September 2010
To enable support in your software for pashto and other languages, your system must support unicode. Most system programs have this enabled by default. For others, you may have to enable it manually during compilation. A very good guide on unicode support in system programs is given here. For other programs (which you compile yourself), make the following changes in /etc/make.conf:
USE="unicode bidi" LINGUAS="ar fa ur en ps" #For arabic, farsi, urdu, english, pashto
If you do not compile your software with the unicode and bidi flags, you have a chance that your software will not be able to work with pashto even if other applications in your system are able to. If you have already compiled a software without these flags, then you should re-compile them again. For e.g., to re-compile openoffice you will use "emerge openoffice".
Keyboard Layouts
There are different Pashto keyboard layouts available that I know of. Some of them are listed below:
Liwal: Their's is one of the first pashto keyboard layouts that were created back in the late 1990s. Their layout targetted windows based operating systems and was available only commercially.
Khpala Pashto: Was the first keyboard layout that was available for free for individual use only. Their layout was available only for windows based operating systems.
Evertype: Was the first set of keyboard layouts that were released under official patronage. The layouts were for Afghanistan based spoken languages including Pashto, Dari, Brahui and Uzbek. The layouts were based on "Computer Locale Requirements for Afghanistan" specifications from the United Nations Development Program and the Afghan Transitional Islamic Administration Ministry of Communications. Most linux distributions did not support these specifications, but they are catching up since 2006 after creation of dari, pashto and uzbek keymap files by Emal Alekozai.
As of now (June 2010), the keymap files by Emal Alekozai are included in xkb and so if you have an up-to-date system, you have very little configuration to do. But if you need to use the Khpala Pashto layout as well, then you can do the following steps:
Check for a file called "af" inside /usr/share/X11/xkb/symbols. The contents of this file provide various keyboard layouts (including the evertype layouts) for Pashto, Dari, and Uzbek. If the file exists and you only require the Evertype layouts, then proceed to step 6. If you want the Khpala Pashto keyboard layout, or if the "af" file does not exist, then proceed with step 2.
Download the keymap archive file. Extract the file af and copy it to /usr/share/X11/xkb/symbols. You may require root access to do this.
Modify the file "base.lst" located in /usr/share/X11/xkb/rules using nano or any other text editor. Note: If you have configured your keyboard in X through evdev, then you should modify the file "evdev.lst" instead. The layout of this file is as such:
! model ... // List of keyboard models ! layout ... // List of layouts (per country) ! variant ... // List of languages and variants
Under the section "! layout", add the following entry (if it does not exist already):
af Afghanistan
Example output:
Under the section "! variant", add the following entry (again, making sure not to create duplicate entries):
ps af: Pashto uz af: Southern Uzbek olpc-ps af: OLPC Pashto olpc-fa af: OLPC Dari olpc-uz af: OLPC Southern Uzbek pash af: Khyber.ORG (Khpala Pashto)
Exit when finished. Example output is below:
Modify the file "base.xml" located in /usr/share/X11/xkb/rules using nano or any other text editor. Note: If you have configured your keyboard in X through evdev, then you should modify the file "evdev.xml" instead. Search for the following text (You should find it at around line 1,348):
Your output should look as follows: Save changes and exit.
You may need to restart your X session either by logging out, or pressing CTRL+ALT+BACKSPACE, or running /etc/init.d/xdm restart from the terminal.
Once X is restarted, you should be able to see (under gnome) the keyboard indicator on your desktop. If you don't, you can enable it (under gnome) using following steps:
Right click on gnome panel and select "Add to Panel"
Select "Keyboard Indicator" from list of options
Right click on the icon and:
Select "Keyboard Preferences"
Go to Layout tab and select "Add"
Select Pashto either "by language" or "by country"
NOTE: Just because you enable a Pashto layout does not mean you can use it in every software in your system. To avoid this, see note on USE in General Settings