How to install japanese keyboard layout on Elementary OS
In order to install japanese language keyboard layout in Elementary OS, use fcitx, but during installation choose "japanese language" instead of "chinese language". Keep in mind, that under Freya, nor ibus, nor SCIM is working properly.
First, you have to add fcitx repository:
$ sudo add-apt-repository ppa:fcitx-team/nightly
Then update your sources:
$ sudo apt-get update
After that you can install fcitx and chinese input layout:
$ sudo apt-get install fcitx fcitx-config-gtk fcitx-sunpinyin fcitx-module-cloudpinyin fcitx-chewing fcitx-table-all