Localization"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

Line 21: Line 21:
 
* Edit the jp.js file, making all necessary translations there. This file is in JavaScript format, so all string rules must respect the JavaScript specifications.
 
* Edit the jp.js file, making all necessary translations there. This file is in JavaScript format, so all string rules must respect the JavaScript specifications.
 
* Save the file. We recommend using the UTF-8 encoding.
 
* Save the file. We recommend using the UTF-8 encoding.
* Open ckfinder.js in your favourite editor (make a backup first) and search for:
+
* Open ckfinder.js in your favourite editor (make a backup first), search for:
 
<source>
 
<source>
 
var l={};a.lang={ko:{cs:1,de:1,en:1,'es-mx':1,hu:1,lv:1,nl:1,no:1,'pt-br':1,sk:1,sv:1,'zh-tw':1,
 
var l={};a.lang={ko:{cs:1,de:1,en:1,'es-mx':1,hu:1,lv:1,nl:1,no:1,'pt-br':1,sk:1,sv:1,'zh-tw':1,
 
da:1,el:1,es:1,fr:1,it:1,nb:1,nn:1,pl:1,ru:1,sl:1,'zh-cn':1}
 
da:1,el:1,es:1,fr:1,it:1,nb:1,nn:1,pl:1,ru:1,sl:1,'zh-cn':1}
 
</source>
 
</source>
Add there '''<code>'jp':1</code>''':
+
and add there '''<code>'jp':1</code>'''
 
<source>
 
<source>
var l={};a.lang={ko:{cs:1,de:1,en:1,'es-mx':1,hu:1,''''jp':1'''',lv:1,nl:1,no:1,'pt-br':1,sk:1,sv:1,'zh-tw':1,da:1,
+
var l={};a.lang={ko:{''''jp':1'''',cs:1,de:1,en:1,'es-mx':1,hu:1,lv:1,nl:1,no:1,'pt-br':1,sk:1,sv:1,'zh-tw':1,da:1,
 
el:1,es:1,fr:1,it:1,nb:1,nn:1,pl:1,ru:1,sl:1,'zh-cn':1}
 
el:1,es:1,fr:1,it:1,nb:1,nn:1,pl:1,ru:1,sl:1,'zh-cn':1}
 
</source>
 
</source>
and save the file.
+
(and save the file).
 
* You may disable the automatic language detection and set the new language as the default one, to force the browser to load your file.
 
* You may disable the automatic language detection and set the new language as the default one, to force the browser to load your file.
 
* Test the interface.
 
* Test the interface.

Revision as of 15:32, 18 May 2010

CKFinder is fully localizable considering specific language cultural aspects, like date formatting.

Automatic Language Detection

By default, CKFinder will try to detect the user language. If a localization file is available for that language the interface is automatically adapted to it. If no language file is available, a default language is loaded (by default US English).

To disable the automatic language detection, simply edit the config.js file and set language to one of available languages.

For example, the following forces the interface to load the German localization file, disabling the automatic detection feature:

config.language = 'de';

Localizing CKFinder

Localize is the act of adapting a software to a culture. In CKFinder, this is done by creating a localization file in the "lang" folder and a small localization file for the server side part of CKFinder inside of core/connector/ext/lang folder.

For example, to create a Japanese localization file, just follow these steps:

  • Create a copy of the English localization file (en.js) and name it jp.js.
  • Edit the jp.js file, making all necessary translations there. This file is in JavaScript format, so all string rules must respect the JavaScript specifications.
  • Save the file. We recommend using the UTF-8 encoding.
  • Open ckfinder.js in your favourite editor (make a backup first), search for:
var l={};a.lang={ko:{cs:1,de:1,en:1,'es-mx':1,hu:1,lv:1,nl:1,no:1,'pt-br':1,sk:1,sv:1,'zh-tw':1,
da:1,el:1,es:1,fr:1,it:1,nb:1,nn:1,pl:1,ru:1,sl:1,'zh-cn':1}

and add there 'jp':1

var l={};a.lang={ko:{''''jp':1'''',cs:1,de:1,en:1,'es-mx':1,hu:1,lv:1,nl:1,no:1,'pt-br':1,sk:1,sv:1,'zh-tw':1,da:1,
el:1,es:1,fr:1,it:1,nb:1,nn:1,pl:1,ru:1,sl:1,'zh-cn':1}

(and save the file).

  • You may disable the automatic language detection and set the new language as the default one, to force the browser to load your file.
  • Test the interface.

The following are some notes about a few localization entries in the language file:

  • dir: sets the interface reading direction. At this time, CKFinder is not compatible with right-to-left languages, so leave this entry as 'ltr'.
  • HelpLang: if you don't have also localized the help files, leave this entry intact ('en') or set it to any of the available help translated languages.
  • HelpTip: if you don't have localized the help files, we recommend indicating the help language in the tooltip. For example, in Italian you may translate it to "Aiuto (Inglese)".

Localizing the Help files

It is possible to localize the CKFinder help files. Just follow these steps to translate it to, for example, German:

  • In the "core/help" folder, create a copy of the "en" folder and rename it to "de".
  • Edit all related files inside the "de" folder.
  • Screenshots may also be replaced in the "de/files/images" folder.
  • In the localization file for German (core/lang/de.js), set the HelpLang entry to "de".

That's it. Your users will now enjoy a full localized experience with CKFinder.

Contributing Localizations

We of course welcome localization files contributions. In this way, others can also give their contributions to make the translations better and more complete. Feel free to contact us for it.