Difference between revisions of "Languages"

Line 249: Line 249:
 
* System Menu -> System Settings -> Language Support and set the "Keyboard Input Method" to "ibus"
 
* System Menu -> System Settings -> Language Support and set the "Keyboard Input Method" to "ibus"
 
* Then log out and back in again.
 
* Then log out and back in again.
 +
 +
 +
 +
=Sources=
 +
 +
It took me many hours to find and compile all the current information. PinYin Joe is an excellent base to start with:
 +
* installation # 1  http://www.pinyinjoe.com/linux/ubuntu-12-chinese-setup.htm
 +
* installation # 2  http://www.pinyinjoe.com/pinyin/3rdpartyapps.htm#googlepinyin
 +
* Chinese fonts #    http://www.pinyinjoe.com/linux/ubuntu-10-chinese-fonts-openoffice-language-features.htm

Revision as of 17:06, 24 April 2016


On this page you'll find how to:

  • Setup languages fonts
  • Display different languages
  • Input in different languages (chinese, swedish, french...)



Fonts

European / common fonts

apt-get install xfonts-intl-european xfonts-intl-phonetic
apt-get install mathematica-fonts
apt-get install ttf-mscorefonts-installer
apt-get install fontypython ttf-opensymbol


Asian fonts

apt-get install xfonts-intl-asian xfonts-intl-chinese xfonts-intl-chinese-big
apt-get install pinyin-database sunpinyin-utils libpinyin-utils
apt-get install fonts-arphic-ukai fonts-arphic-uming
apt-get install fonts-arphic-*
# See https://en.wikipedia.org/wiki/WenQuanYi
apt-get install fonts-wqy-zenhei fonts-wqy-microhei xfonts-wqy


Android / Google fonts

apt-get install fonts-droid-fallback fonts-roboto fonts-roboto-hinted


Printing fonts

Full set of printing fonts:

apt-get install texlive-fonts-recommended texlive-fonts-extra texlive-lang-chinese texlive-lang-french texlive-lang-english

!! Warning this required about 900 Mb !!


Support many languages (locales)

Installation

apt-get install locales


Configuration (1)

  • Search for your language locale's String
# replace FR by your own language code (zh, de, sv, ...)
less /usr/share/i18n/SUPPORTED | grep fr


Create / edit the configuration file

vim /var/lib/locales/supported.d/local

# Example of many languages combination:
en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8
de_DE.UTF-8 UTF-8
sv_SE.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8


Configuration (2)

Regenerate system languages

dpkg-reconfigure locales


Check result:

locale -a


(i) You need to restart your server before using the new languages.


Inputs manager

Depending on your Linux distribution and version you might be interested by:

  • IBUS - old input manager, still efficient. Default on most distribution until 2015
  • FCITX - new input manager, new standard since 2015.


FCITX (Ubuntu >= 16)

Installation

Input methods:

apt-get install fcitx
apt-get install fcitx-libs fcitx-table-emoji fcitx-table-easy-big

# Pinyin = chinese chars. encoded in standard GB
# SunPinYin = OpenSource project, official pinyin support for Linux
# Google PinYin = Same PinYin as Android 
# CheWing = MS Windows PinYin
apt-get install fcitx-pinyin fcitx-sunpinyin fcitx-googlepinyin fcitx-chewing

# Japanese input
apt-get install fcitx-anthy 

# Display pinyin input menu (list of characters) -> qimpanel does NOT work well on XCFE. Better remove it and switch to the 'classic' UI
apt-get remove --purge fcitx-ui-qimpanel
apt-get install fcitx-ui-classic fcitx-ui-light

# Keyboard support for Mozilla Firefox and other applications
apt-get install fcitx-mozc


Language selector:

apt-get install im-config


FCITX as default input manager

Language support

  • Go to Preferences > Language support
  • Install required languages (French, Chinese, English, ...)
  • Select input method fcitx

Language Support

  • Confirm!


IM-Config

Sometimes the 1st step is not enough. You need to run im-config as well.

# run as a user
im-config
  • Click OK on the 1st screen
  • Click YES on the 2nd screen to explicitly set the language input manager

IM-Config #1

  • Choose FCITX on the new screen and valid

IM-Config #2

  • Confirm!


Remove conflict

Run the next step before you log-off / log-in and use FCITX as your default input manager. There is a bug in the default configuration that prevent the display of PinYin characters table.


BugFix: PinYin table doesn't appear

By default on the language support step Ubuntu force the installation of a crappy package fcitx-ui-qimpanel. You must remove it:

# Display pinyin input menu (list of characters) -> qimpanel does NOT work well on XCFE. Better remove it and switch to the 'classic' UI
apt-get remove --purge fcitx-ui-qimpanel
apt-get install fcitx-ui-classic fcitx-ui-light

After installation you must log-off / log-in


Usage

Once you re-log yourself you should see a FCITX option on the toolbar (close to the clock).

  • Click on FCITX toolbar > configure input method
  • Add new languages and input method as follow:
    • Click on ADD input

FCITX config #1

    • Un-tick the check box to display ALL languages ; search for the input you'd like to add. (i) Chinese input are at the bottom

FCITX config #2


Done!

You can use PinYin or any other input you'd like!


Input manager IBUS (Ubuntu < 16)

apt-get install ibus

Chinese PinYin

apt-get install ibus-pinyin ibus-sunpinyin ibus-googlepinyin


Input configuration

ibus-setup


Set Ibus as default:

  • System Menu -> System Settings -> Language Support and set the "Keyboard Input Method" to "ibus"
  • Then log out and back in again.


Sources

It took me many hours to find and compile all the current information. PinYin Joe is an excellent base to start with: