CKFinder 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.

(Article contents proof-read and formatted)
Line 1: Line 1:
 +
{{#CUSTOMTITLE:CKFinder Localization}}
 
__TOC__
 
__TOC__
CKFinder is fully localizable considering specific language cultural aspects, like date formatting.
+
CKFinder is fully localizable, including language-specific cultural aspects like date formatting.
  
 
== Automatic Language Detection ==
 
== Automatic Language Detection ==
 +
By default CKFinder will try to detect the user language. If a localization file is available for that language, the interface will be adapted to it automatically. If no matching language file is available, a default language will be loaded (US English by default).
  
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).
+
In order to disable automatic language detection, edit the <code>config.js</code> file and set the language to one of available languages.
  
To disable the automatic language detection, simply edit the '''config.js''' file and set language to one of available languages.
+
For example, the following setting forces CKEditor to display the interface in German, disabling the automatic detection feature:
 
+
<source lang="javascript">
For example, the following forces the interface to load the German localization file, disabling the automatic detection feature:
 
<source>
 
 
config.language = 'de';
 
config.language = 'de';
 
</source>
 
</source>
  
 
== Localizing CKFinder ==
 
== Localizing CKFinder ==
 +
''Localization'' is the act of adapting software to a culture. In CKFinder this is done by creating the main localization file in the <code>lang</code> folder as well as a small localization file for the server side part of CKFinder inside the <code>core/connector/ext/lang</code> folder.
  
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, follow the steps described below:
 
+
* Create a copy of the English localization file (<code>en.js</code>) and name it <code>jp.js</code>.
For example, to create a Japanese localization file, just follow these steps:
+
* Edit the <code>jp.js</code> file and translate all language strings. This file is in JavaScript format, so the string format must respect the JavaScript specification.
 
 
* 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.
 
* Save the file. We recommend using the UTF-8 encoding.
* Open ckfinder.js in your favourite editor (make a backup first), search for:
+
* Open the <code>ckfinder.js</code> file in your favourite editor (make a backup first), and search for:
<source>
+
<source lang="javascript">
 
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>
and add there '''<code>'jp':1</code>'''
+
and add '''<code>'jp':1</code>''' there:
<source>
+
<source lang="javascript">
 
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,
 
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).
+
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 automatic language detection and set the new language as the default one in order to force the browser to load your file.
* Test the interface.
+
* Test the user interface to check the correctness of your localization.
* Note: to avoid having to change ckfinder.js, simply send us your translation (see [[#Contributing_Localizations|Contributing Localizations]]) and we will include it in the next release.
+
* Note: to avoid having to change <code>ckfinder.js</code>, you can send us your translation (see [[#Contributing_Localizations|Contributing Localizations]]) and we will include it in the next release.
  
 
The following are some notes about a few localization entries in the language file:
 
The following are some notes about a few localization entries in the language file:
 
+
* <code>dir</code> &ndash; sets the interface reading direction. You can choose between <code>ltr</code> for Left-to-Right languages like English and <code>rtl</code> for Right-to-Left languages like Hebrew or Arabic.
* '''dir''': sets the interface reading direction. At this time, CKFinder is not compatible with right-to-left languages, so leave this entry as 'ltr'.
+
* <code>HelpLang</code> &ndash; sets the language of the Help files. If you have not localized them, leave this entry intact (<code>en</code>) or set it to any of the available translated Help files.
* '''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.
+
* <code>HelpTip</code> &ndash; if you have not localized the Help files, we recommend you indicate the Help language in the tooltip. For example, for Italian you may translate it to "Aiuto (Inglese)".
* '''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 ==
 
== Localizing the Help Files ==
 +
It is possible to localize the CKFinder Help files. Follow these steps to translate them to, for example, German:
 +
* Create a copy of the <code>en</code> subfolder in the <code>core/help</code> folder and rename it to <code>de</code>.
 +
* Edit all related files inside the <code>de</code> folder.
 +
* You can also replace the screenshots with their localized equivalents and place them in the <code>de/files/images</code> folder.
 +
* In the localization file for German (<code>core/lang/de.js</code>), set the <code>HelpLang</code> entry to <code>de</code>.
  
It is possible to localize the CKFinder help files. Just follow these steps to translate it to, for example, German:
+
Your users will now enjoy a fully localized experience with CKFinder.
 
 
* 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 ==
 
== Contributing Localizations ==
 +
All localization contributions are most welcome by CKSource and much appreciated by the international audience of our product as well as your users. The same goes for all efforts to improve existing translations and complete them. Feel free to [http://cksource.com/contact contact us] if you have any questions or would like to send us your submission.
  
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 [http://cksource.com/contact contact us] for it.
+
<note>We prepared a '''''nice gift''''' for each person who will send us a complete (new) translation ;-) Just make sure to provide us with your e-mail address so we can contact you.</note>
 
 
We have prepared a '''nice gift''' for everyone that will send us a complete (new) translation ;-) Just make sure to provide us  
 
with your email address so we can contact you.
 

Revision as of 12:29, 17 August 2011

CKFinder is fully localizable, including language-specific 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 will be adapted to it automatically. If no matching language file is available, a default language will be loaded (US English by default).

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

For example, the following setting forces CKEditor to display the interface in German, disabling the automatic detection feature:

config.language = 'de';

Localizing CKFinder

Localization is the act of adapting software to a culture. In CKFinder this is done by creating the main localization file in the lang folder as well as a small localization file for the server side part of CKFinder inside the core/connector/ext/lang folder.

For example, to create a Japanese localization file, follow the steps described below:

  • Create a copy of the English localization file (en.js) and name it jp.js.
  • Edit the jp.js file and translate all language strings. This file is in JavaScript format, so the string format must respect the JavaScript specification.
  • Save the file. We recommend using the UTF-8 encoding.
  • Open the ckfinder.js file in your favourite editor (make a backup first), and 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 'jp':1 there:

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}

Save the file.

  • You may disable automatic language detection and set the new language as the default one in order to force the browser to load your file.
  • Test the user interface to check the correctness of your localization.
  • Note: to avoid having to change ckfinder.js, you can send us your translation (see Contributing Localizations) and we will include it in the next release.

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

  • dir – sets the interface reading direction. You can choose between ltr for Left-to-Right languages like English and rtl for Right-to-Left languages like Hebrew or Arabic.
  • HelpLang – sets the language of the Help files. If you have not localized them, leave this entry intact (en) or set it to any of the available translated Help files.
  • HelpTip – if you have not localized the Help files, we recommend you indicate the Help language in the tooltip. For example, for Italian you may translate it to "Aiuto (Inglese)".

Localizing the Help Files

It is possible to localize the CKFinder Help files. Follow these steps to translate them to, for example, German:

  • Create a copy of the en subfolder in the core/help folder and rename it to de.
  • Edit all related files inside the de folder.
  • You can also replace the screenshots with their localized equivalents and place them in the de/files/images folder.
  • In the localization file for German (core/lang/de.js), set the HelpLang entry to de.

Your users will now enjoy a fully localized experience with CKFinder.

Contributing Localizations

All localization contributions are most welcome by CKSource and much appreciated by the international audience of our product as well as your users. The same goes for all efforts to improve existing translations and complete them. Feel free to contact us if you have any questions or would like to send us your submission.

important note
We prepared a nice gift for each person who will send us a complete (new) translation ;-) Just make sure to provide us with your e-mail address so we can contact you.