PHP Zone

How to add tamil language in FCK Editor ?

14 Oct , 2015  

Introduction to FCK Editor :

The first version of CKEditor, under the name FCKeditor, was released in March 2003 by Frederico Caldeira Knabben, the creator of the editor and the project’s Benevolent Dictator for Life. FCKeditor 0.8 supported XHTML, “Paste from Word” and Internet Explorer 5.0. During the next two years, partnerships with Oracle Corporation and IBM Corporation were signed. After crossing 3 million downloads, FCKeditor was completely reviewed and redesigned into CKEditor 3.0, with special attention given to performance, accessibility and a new UI. In December 2012, CKEditor 4.0 was released with an Inline Editing solution, reformatted source code, enhanced DOM and CSS performance, a new skin and an add-ons repository. The server side implementations were removed.

About FCK Editor :

CKEditor (formerly FCKeditor) is an open source WYSIWYG text editor from CKSource designed to bring common word processor features directly to web pages, simplifying their content creation. It aims to be lightweight and requires no client-side installation. CKEditor is distributed under the GPL, LGPL and MPL licenses.

Features of FCK Editor :

  • Inline editing :

    To improve the editing experience CKEditor now includes inline editing – a tool that removes the editing area. Say goodbye to impractical text boxes! Now What You See Is Really What You Get.

  • Spell check as you type :

    CKEditor includes a zero installation spell check as you type (SCAYT) solution. No server integration required. The application is based on the quality spell checking services provided by

  • Safe undo function :

    With CKEditor you don’t need worry about mistakes because every single action can be safely reverted, guaranteeing that you’ll never break things or lose your texts.

  • Right to left interface :

    Several languages are read from “right to left”, like Arabic, Farsi or Hebrew. For those users, CKEditor will also render from right to left, making them right at home.

  • UI language auto detection :

    If you have international users CKEditor can automatically detect their language and localizes the interface accordingly. The editor is translated into over 60 languages!

  • Quality XHTML output :

    CKEditor uses advanced W3C DTD controls to ensure that HTML is properly generated. Users will not enter broken code so your pages will easily validate.

Procedures to add tamil language in FCK Editor :

Step 1 : Create one “tn.js” file for tamil fonts (take one copy from “en.js” [fckeditor/editor/lang/] and replace with tamil font with the name of “tn.js”) and upload it into “fckeditor/editor/lang/” directory.

Step 2 : Include the language code and language title in “fcklanguagemanager.js” , “fckeditorcode_gecko.js” and “fckeditorcode_ie.js” files.

These files are coming under,

(1). fcklanguagemanager.js —> fckeditor/editor/_source/internals/

Search the word “AvailableLanguages :” and add the Tamil language code and title (tn : ‘Tamil’) with in the available languages array.

(2). fckeditorcode_gecko.js —> fckeditor/editor/js/

Search the word “AvailableLanguages :” and add the Tamil language code and title (tn : ‘Tamil’) with in the available languages array.

(3). fckeditorcode_ie.js —> fckeditor/editor/js/

Search the word “AvailableLanguages :” and add the Tamil language code and title (tn : ‘Tamil’) with in the available languages array.

Example :

<script type="text/javascript">
var FCKLanguageManager=FCK.Language={AvailableLanguages:{af:'Afrikaans',ar:'Arabic',bg:'Bulgarian',bn:'Bengali/Bangla',bs:'Bosnian',ca:'Catalan',cs:'Czech',da:'Danish',de:'German',el:'Greek',en:'English','en-au':'English (Australia)','en-ca':'English (Canadian)','en-uk':'English (United Kingdom)',eo:'Esperanto',es:'Spanish',et:'Estonian',eu:'Basque',fa:'Persian',fi:'Finnish',fo:'Faroese',fr:'French','fr-ca':'French (Canada)',gl:'Galician',gu:'Gujarati',he:'Hebrew',hi:'Hindi',hr:'Croatian',hu:'Hungarian',is:'Icelandic',it:'Italian',ja:'Japanese',km:'Khmer',ko:'Korean',lt:'Lithuanian',lv:'Latvian',mn:'Mongolian',ms:'Malay',nb:'Norwegian Bokmal',nl:'Dutch',no:'Norwegian',pl:'Polish',pt:'Portuguese (Portugal)','pt-br':'Portuguese (Brazil)',ro:'Romanian',ru:'Russian',sk:'Slovak',sl:'Slovenian',sr:'Serbian (Cyrillic)','sr-latn':'Serbian (Latin)',sv:'Swedish',th:'Thai',tn:'Tamil',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',zh:'Chinese Traditional','zh-cn':'Chinese Simplified'}

Step 3 : Set the default language to your editor like ,

If you are using JavaScript in your html webpage page means just embed like the following.

<script type="text/javascript">
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"]    = 'tn' ;

If you are using PHP in your webpage page means just embed like the following,

$oFCKeditor->Config['AutoDetectLanguage']   = false ;
$oFCKeditor->Config['DefaultLanguage']  = 'en' ;

Step 4 : Run your webpage to see it in action.

, , , , , ,