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 a chinese compatible font is not already installed:
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 pressing 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, for example:
ibus-daemon -d -x
See IBus wiki for more info.
In xterm shows weird glyphs instead of Chinese characters, but it works OK in other software (e.g. browser), launch xterm with settings that can cope with double spaced characters, e.g.:
xterm -rv -en UTF-8 -fs 10 -fa 'AR PL UMing CN:style=Regular,Regular'