Line 43: | Line 43: | ||
* '''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)". | * '''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 | + | == Localizing the Help Files == |
It is possible to localize the CKFinder help files. Just follow these steps to translate it to, for example, German: | It is possible to localize the CKFinder help files. Just follow these steps to translate it to, for example, German: |
Revision as of 15:47, 18 May 2010
Contents
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.
- Note: to avoid having to change ckfinder.js, simply 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. 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.
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.