app-i18n/ibus-libpinyin is a Chinese input engine on IBus. It is similar to, and a viable alternative for Fcitx and app-i18n/fcitx-libpinyin. It is a modern replacement for the original (outdated) app-i18n/ibus-pinyin.
USE flags for app-i18n/ibus-libpinyin Intelligent Pinyin and Bopomofo input methods based on LibPinyin for IBus
emerge --ask app-i18n/ibus-libpinyin
If you have not already installed a chinese compatible font you will need to:-
emerge --ask media-fonts/arphicfonts
Open up the ibus setup dialogue
Check the 'Next Input Method key' and change if desired. Then switch to 'Input Method' tab and add 'Chinese -> Intelligent Pinyin'. This adds 'Chinese - Intelligent Pinyin' to the list of input methods that ibus will cycle through when you press the 'Input Method Key'. Select 'Chinese - Intelligent Pinyin' on the list and click 'Preferences' to set options as desired.
press the ibus 'special key' (as configured above - by default it is super+Space) and select 'Intelligent Pinyin'. Then type in pinyin to get the chinese character (type 'nihao' and if 你好 appears as 1. press space to accept)
to manually start (IBus) for a user you can do
ibus-daemon -d -x
(see IBus wiki for more info)
In xterm if get weird glyphs instead of chinese characters, but it works OK in other software (e.g. browser) you need to launch xterm with settings that can cope with double spaced characters that you get in chinese. e.g.
xterm -rv -en UTF-8 -fs 10 -fa 'AR PL UMing CN:style=Regular,Regular'