Difference between revisions of "Languages"

Line 73: Line 73:
  
 
=Add new / manage languages (locales)=
 
=Add new / manage languages (locales)=
 +
 +
 +
==Requirement==
  
 
Install languages manager
 
Install languages manager
Line 79: Line 82:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
 +
==Add new language==
  
 
Search for your language [replace ''FR'' by your own language like ''ZH'' or ''SE''...]
 
Search for your language [replace ''FR'' by your own language like ''ZH'' or ''SE''...]
Line 84: Line 89:
 
less /usr/share/i18n/SUPPORTED | grep fr
 
less /usr/share/i18n/SUPPORTED | grep fr
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
!! Always take the UTF-8 + ISO values !! Examples:
 +
* en_GB.UTF-8 UTF-8
 +
* fr_FR.UTF-8 UTF-8
 +
* sv_SE.UTF-8 UTF-8
 +
* zh_CN.UTF-8 UTF-8
 +
 +
 +
  
  
Line 91: Line 105:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
[!] The key '''fr_FR.UTF-8 UTF-8''' is a bit different from the ''SUPPORTED'' file. Only the country code is the same.
+
[!] The key '''fr_FR.UTF-8 UTF-8''' must match an entry in the ''SUPPORTED'' file !!
 +
 
 +
 
 +
 
 +
[alternative] you can directly edit the file:
 +
<syntaxhighlight lang="bash">
 +
vim /var/lib/locales/supported.d/local
 +
 
 +
# You should have:
 +
en_US.UTF-8 UTF-8
 +
fr_FR.UTF-8 UTF-8
 +
sv_SE.UTF-8 UTF-8
 +
</syntaxhighlight>
 +
 
  
  
Line 98: Line 125:
 
dpkg-reconfigure locales
 
dpkg-reconfigure locales
 
</syntaxhighlight>
 
</syntaxhighlight>
!! Always take the UTF-8 + ISO values !!
 
  
  
Examples:
+
Check result:
* en_GB.ISO-8859-1
+
<syntaxhighlight lang="bash">
* en_GB.UTF-8
+
locale -a
* en_GB.ISO-8859-15
+
</syntaxhighlight>
* fr_FR.ISO-8859-1
 
* fr_FR.UTF-8
 
* fr_FR.ISO-8859-15@euro
 
* zh_CN.GB2312
 
* zh_CN.GB18030
 
* zh_CN.GBK
 
* zh_TW.BIG5
 
* zh_TW.EUC-TW
 

Revision as of 11:33, 28 October 2014

Fonts

Main fonts

apt-get install xfonts-intl-asian xfonts-intl-chinese xfonts-intl-european xfonts-intl-phonetic


Printing fonts

apt-get install fontypython ttf-opensymbol

Full set of printing fonts:

apt-get install texlive-fonts-recommended texlive-fonts-extra

!! Warning this required about 800 Mb !!


Mathematics

apt-get install mathematica-fonts


Microsoft fonts

apt-get install ttf-mscorefonts-installer


Chinese fonts

apt-get install fonts-arphic-ukai fonts-arphic-uming


Alternative inputs

Input manager IBUS

apt-get install ibus

Chinese PinYin

apt-get install ibus-pinyin 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.


Xubuntu languages

  • System Menu -> System Settings -> Language Support



Add new / manage languages (locales)

Requirement

Install languages manager

apt-get install locales


Add new language

Search for your language [replace FR by your own language like ZH or SE...]

less /usr/share/i18n/SUPPORTED | grep fr

!! Always take the UTF-8 + ISO values !! Examples:

  • en_GB.UTF-8 UTF-8
  • fr_FR.UTF-8 UTF-8
  • sv_SE.UTF-8 UTF-8
  • zh_CN.UTF-8 UTF-8



Add the new language to the list of the local languages

echo "fr_FR.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local

[!] The key fr_FR.UTF-8 UTF-8 must match an entry in the SUPPORTED file !!


[alternative] you can directly edit the file:

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

# You should have:
en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8
sv_SE.UTF-8 UTF-8


Regenerate system languages

dpkg-reconfigure locales


Check result:

locale -a