[Localization] Khmer keyboard composed keys with xim

Philipp Kocher philipp.kocher at gmx.net
Mon Jun 29 22:10:35 EDT 2009



Sayamindu Dasgupta wrote:
> Hello,
> 
> 2009/6/29 Philipp Kocher <philipp.kocher at gmx.net>:
>> Hello
>>
>> Below is a short description of how to get the composed keys (one
>> keystroke generates multiple characters) of the Khmer keyboard on the XO
>> working with the xim (based on build 802).
>> Please give feedback (e.g. what are the known problems with this
>> configuration) or help testing (e.g. the Write Activity behaves sometimes
>> strangely with the default font "DejaVu Serif", showing sometimes Khmer and
>> sometimes just wired characters ...).
>>
>> 1. Install rpm "khmeros-fonts-base" (available in Fedora repos)
>> 2. Copy the attached file "kh" to /usr/share/X11/xkb/symbols/
>> 3. Copy the attached file "keyboard" to /etc/sysconfig/
>> 4. Replace in the script /usr/bin/olpc-session the line "export
>> GTK_IM_MODULE" with "export GTK_IM_MODULE="xim""
>> 5. Append the content of the attached file Compose to
>> /usr/share/X11/locale/en_US.UTF-8/Compose
>> 6. Add the aliases "km_KH.utf8  km_KH.UTF-8" and "km_KH.utf8:
>> km_KH.UTF-8" to the file /usr/share/X11/locale/locale.alias
>> 7. Add the references "en_US.UTF-8/XLC_LOCALE  km_KH.UTF-8" and
>> "en_US.UTF-8/XLC_LOCALE:  km_KH.UTF-8" to the file
>> /usr/share/X11/locale/locale.dir
>> 8. Add the references "en_US.UTF-8/Compose  km_KH.UTF-8" and
>> "en_US.UTF-8/Compose:  km_KH.UTF-8" to the file
>> /usr/share/X11/locale/compose.dir
>>
>> - In point 6., 7. and 8. the difference between the two strings is just
>> a colon.
> 
> Yes - the strings with colons in them are actually autogenerated by
> the build process, so if the changes are made at the source level,
> they need not go in.
> 
>> - The when changing the language, the Sugar Control Panel writes
>> "LANG="km_KH.utf8"" in the file ~/.i18n and not km_KH.UTF-8 as expected. The
>> switch for the "xim" input method in /usr/bin/olpc-session for am_ET and
>> ne_NP probably doesn't work?
> 
> ne_NP and am_ET works because laptops shipped to those regions have
> /home/olpc/.i18n pre-set to ne_NP.UTF-8 and am_ET.UTF-8
If a user changes the language in the Control Panel (e.g. to English) 
and later switches back to Nepali .i18n will be set to ne_NP.utf8 and 
the script doesn't set the input method to xim anymore.
> 
>> - I didn't create a new Compose file for km_KH because this means that
>> the composed keys just work if the language is set to Khmer. I think it
>> is better when the composed keys work independent of the language
>> configured in sugar. Other languages use the Compose file in en_US.UTF-8 as
>> well.
>>
>> The composed keys with an US keyboard are:
>> <shift><g>
>> <shift><j>
>> <shift><v>
>> <shift><[>
>> <shift><s>
>>
> 
> Sounds fine to me. The problem you described with Write is a known one
> in the 8.2.x builds - the only workaround at the moment is to manually
> select the font for the language you are using.
> 
> Thanks,
> Sayamindu
> 
> 
> 


More information about the Localization mailing list