Hindi
From Gentoo Linux Wiki
Contents |
[edit] Introduction
The default Hindi keyboard provided in X.org has non-phonetic English-to-Hindi character mapping, and therefore typing in Hindi is difficult for the casual user.
This article explains how to install and use SCIM, which supplies a phonetic Hindi keyboard.
[edit] Getting started
To begin with, your system must be able to display the Hindi (Devanagari) font.
[edit] Portage
Make sure your /etc/make.conf file has the Hindi locale globally enabled, with the portage variable LINGUAS="hi"
If it already does, then skip ahead to the next section!
If not, add it in using your favourite text editor -
| File: /etc/make.conf |
... LINGUAS="hi" |
Then apply the change globally with -
emerge -DNav world
[edit] Indic font display
You must additionally have the media-fonts/lohit-fonts package installed to view Hindi text. Check if the package is present with qsearch lohit-fonts, otherwise if you get no output install it with -
emerge -Dav media-fonts/lohit-fonts
[edit] Typing Hindi with SCIM
[edit] Installation
[edit] QT
x11-libs/qt is a central dependency of the app-i18n/scim-bridge package. QT's slotted versions 3 and 4 must be compiled with specific USE flags (immqt-bc and qt3support) for SCIM to function properly.
Check that those 2 flags have been compiled in with emerge -pv =qt-3* =qt-4*
If it has both of them, then skip ahead to the next sub-section.
If not, then accordingly add them as package specific USE flags to your /etc/portage/package.use -
| File: /etc/portage/package.use |
... =x11-libs/qt-3* immqt-bc =x11-libs/qt-4* qt3support |
Then apply the change globally with -
emerge -DNav world
The compile will take a little long, so go make yourself a cup of tea :)
[edit] SCIM
SCIM's installation is as simple as -
emerge app-i18n/scim-tables app-i18n/scim-bridge
[edit] Launching the daemon
SCIM requires you to export some environment variables to work properly. So, lets create a Bash file /etc/profile.d/scim.sh to . Login as root to create the file using your favourite text editor and then copy the following -
| File: /etc/profile.d/scim.sh |
# The SCIM variables below are be exported prior to starting your WM, # so that all your compatible X programs can default to it export XMODIFIERS=@im=SCIM export GTK_IM_MODULE=scim-bridge export QT_IM_MODULE=scim |
You do not have to include the scim -d daemon launch command in your ~/.xinitrc. SCIM will automatically launch itself when you start an X application that supports multilingual text input.
Now that you have SCIM installed, to begin using it, you have to logout completely. First quit your X session by selecting "Logout". Then, at the shell prompt, exit logs you out completely. Login again and start your X session using startx
[edit] Recommended configuration
The default keyboard shortcuts in SCIM can be a little frustrating. For example, the order in which your release the <shift> and <ctrl> keys together switches keyboard layouts. Also the toolbar persistently raises itself during full-screen movies.
So now that you have SCIM up and running, (right-click) SCIM taskbar icon » SCIM Setup.
To take care of the first issue above, erase all the hotkeys by Front End » Global Setup » Hotkeys » Trigger ... » Selected keys (highlight all) » Delete. Repeat for all the other hotkey fields.
For the second issue, simply set Panel » GTK » Toolbar » Show to "Never".
[edit] Saving Hindi text files
Don't forget to save the text files in UTF-8 format!
[edit] Reference Keyboard Image
This English-to-Hindi keyboard map aid will help you find the odd 'matra':)
To create the 'r' matra as in 'prakash' or 'Kriya', use pfrkaSh or kfrIya
Feel free to download it as a reference. You may also edit and improve on the source .xcf image in the GIMP media-gfx/gimp. Thus you can show off your graphics editing skills by uploading the image back to this wiki
Enjoy!

