Localization
These settings configure TinyMCE's language capabilities, including right-to-left support and language Localization.
Contribute to this pagedirectionality
This option allows you to set the base direction of directionally neutral text (i.e., text that doesn't have inherent directionality as defined in Unicode) within the editor. This is similar to the use of the 'dir'
attribute when using content editable elements by themselves.
Type: String
Default Value: 'ltr'
Possible Values: 'ltr'
, 'rtl'
Example
tinymce.init({
selector: 'textarea', // change this value according to your HTML
directionality : 'ltr'
});
language
This option allows you to specify the language that TinyMCE's user interface will appear in. That is, the toolbar buttons and menu items. By default, TinyMCE will use US English as the language of the interface.
If you wish to use a language other than English, please follow these steps:
- Download the TinyMCE 4 language pack from here.
- Unpack the language
.js
file into yourtinymce/langs
folder. - Set the
language
option in your TinyMCE configuration to the language code in the list below the example. - Confirm that the language has been set successfully by loading TinyMCE.
Please note, the language code you set in your TinyMCE configuration must match the filename of the language file. If the language file is not found, TinyMCE will not load.
Type: String
Default Value: en_US
Example
In this example we will set the editor language to Swedish.
tinymce.init({
selector: 'textarea', // change this value according to your HTML
language: 'sv_SE'
});
The available language codes for use with this option are as follows:
Language | Code |
---|---|
Arabic | ar |
Arabic (Saudi Arabia) | ar_SA |
Armenian | hy |
Azerbaijani | az |
Basque | eu |
Belarusian | be |
Bengali (Bangladesh) | bn_BD |
Bosnian | bs |
Bulgarian (Bulgaria) | bg_BG |
Catalan | ca |
Chinese (China) | zh_CN |
Chinese (Taiwan) | zh_TW |
Croatian | hr |
Czech | cs |
Danish | da |
Divehi | dv |
Dutch | nl |
English (Canada) | en_CA |
English (United Kingdom) | en_GB |
Estonian | et |
Faroese | fo |
Finnish | fi |
French (France) | fr_FR |
Gaelic, Scottish | gd |
Galician | gl |
Georgian (Georgia) | ka_GE |
German | de |
German (Austria) | de_AT |
Greek | el |
Hebrew (Israel) | he_IL |
Hindi (India) | hi_IN |
Hungarian (Hungary) | hu_HU |
Icelandic (Iceland) | is_IS |
Indonesian | id |
Italian | it |
Japanese | ja |
Kabyle | kab |
Kazakh | kk |
Khmer (Cambodia) | km_KH |
Korean (Korea) | ko_KR |
Kurdish | ku |
Kurdish (Iraq) | ku_IQ |
Latvian | lv |
Lithuanian | lt |
Luxembourgish | lb |
Malayalam | ml |
Malayalam (India) | ml_IN |
Mongolian (Mongolia) | mn_MN |
Norwegian Bokmål (Norway) | nb_NO |
Persian | fa |
Persian (Iran) | fa_IR |
Polish | pl |
Portuguese (Brazil) | pt_BR |
Portuguese (Portugal) | pt_PT |
Romanian | ro |
Russian | ru |
Serbian | sr |
Sinhala (Sri Lanka) | si_LK |
Slovak | sk |
Slovenian (Slovenia) | sl_SI |
Spanish | es |
Spanish (Mexico) | es_MX |
Swedish (Sweden) | sv_SE |
Tajik | tg |
Tamil | ta |
Tamil (India) | ta_IN |
Tatar | tt |
Thai (Thailand) | th_TH |
Turkish | tr |
Turkish (Turkey) | tr_TR |
Uighur | ug |
Ukrainian | uk |
Ukrainian (Ukraine) | uk_UA |
Vietnamese | vi |
Vietnamese (Viet Nam) | vi_VN |
Welsh | cy |
language_url
When using the language
option to set the user interface language you may choose to place any language pack(s) in a directory other than the default. If you do this you need to provide a simple URL to where the language file is located. We recommend using a site absolute URL.
Type: String
Example
tinymce.init({
selector: 'textarea', // change this value according to your HTML
language_url : '/languages/fi.js' // site absolute URL
});
You can download the TinyMCE 4 language pack here.
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.