2

I am using CKEditor in my project and I need to set its input language as Farsi.

I already done this with some textboxes and textareas with a .js file named "FarsiType.js".

FarsiType.js is here : http://www.farsitype.ir/FarsiType.js

When we add an attribute lang="fa" with textbox control its input will be change to Farsi language.

like this :

 <asp:TextBox runat="server" ID="tr" lang="fa" dir="rtl"/> 

I need to set Farsi in put for CKEditor too. So how do i set its text input to Farsi language ?

Please help me

0

2 Answers 2

2

Default CKEditor language

Default language is used in case no language is set using config.language option and the editor is not able to use the user language. In order to change default language use the following command:

config.defaultLanguage = 'fa'; 

For more details visit:
http://docs.cksource.com/Talk:CKEditor_3.x/Developers_Guide

Sign up to request clarification or add additional context in comments.

3 Comments

thanks. While putting like you mentioned above its(CKEditor) interface switching to Farsi language But the input is still in English
see Doctype issue from above link.
config.docType = '&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//FA"&gt;'; i added the above code in config.js still the content is not Arabic
1

The only think you could change to Farsi is the CKEditor's face, buttons title and the text direction. The reason is FarsiType.js is workin on fields and textareas. If you look closely to CKEditor in developer tools, you will see in CKEditor you are typing in the body inside an iFrame and then when you submit the form it will transfer the content to your textarea. Its not possible to apply http://www.farsitype.ir/FarsiType.js to CKEditor unless you access the iframe before load and add the script inside the iframe.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.