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.

(New page: == Interface Localization == The languages files must be placed inside the "editor/lang" directory of the project. You can use the file "'''en.js'''" as the base file for your translation...)
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Interface Localization ==
 
== Interface Localization ==
  
The languages files must be placed inside the "editor/lang" directory of the project. You can use the file "'''en.js'''" as the base file for your translations. The file names are based on the [http://www.faqs.org/rfcs/rfc3066.html:RFC 3066] standards (but in lowercase) and the [http://www.loc.gov/standards/iso639-2/php/English_list.php:ISO 639-1]. So, for example, a file for the '''Portuguese language''' should be called "'''pt.js'''".
+
The languages files must be placed inside the "editor/lang" directory of the project. You can use the file "'''en.js'''" as the base file for your translations. The file names are based on the [http://www.faqs.org/rfcs/rfc3066.html RFC 3066] standards (but in lowercase) and the [http://www.loc.gov/standards/iso639-2/php/English_list.php ISO 639-1]. So, for example, a file for the '''Portuguese language''' should be called "'''pt.js'''".
  
 
Translation could also be localized for a specific country. In this case, for example, a Brazilian Portuguese translation file must be called "'''pt-br.js.'''"
 
Translation could also be localized for a specific country. In this case, for example, a Brazilian Portuguese translation file must be called "'''pt-br.js.'''"
  
The browser’s language auto detection system uses the first available language that best fits the client settings. For example, if a client computer is set to Brazilian Portuguese and there is no pt-br.js file available, the pt.js is used if available. If still not available, the default language is used (from the configuration file, by default English).
+
The browser’s language auto detection system uses the first available language that best fits the client settings.
 +
 
 +
For example, if a client computer is set to Brazilian Portuguese and there is no pt-br.js file available, the pt.js is used if available. If still not available, the default language is used (from the configuration file, by default English).
  
 
When creating new language files, you need to add an entry for it in the "editor/_source/internals/fcklanguagemanager.js" file. Something like this:
 
When creating new language files, you need to add an entry for it in the "editor/_source/internals/fcklanguagemanager.js" file. Something like this:
<pre>
+
<pre>AvailableLanguages =
AvailableLanguages =
 
 
{
 
{
    en : 'English',
+
en&nbsp;: 'English',
    pt : 'Portuguese'
+
pt&nbsp;: 'Portuguese'
 
}
 
}
</pre>
+
</pre>  
To test your language file, you could run the editor using the [[FCKeditor 2.x/Developers Guide/Customization/Scripts Compression#Using the "_source" files|source scripts]]. Just open the "_samples/html/sample03.html" files.
+
To test your language file, you could run the editor using the [[FCKeditor 2.x/Developers Guide/Customization/Scripts Compression#Using the|source scripts]]. Just open the "_samples/html/sample03.html" files.
  
 
When you feel the translation is completed and the tests are done, you will need to "re-generate" the compressed JavaScript files of FCKeditor using the [[FCKeditor 2.x/Developers Guide/Customization/Scripts Compression#Using the FCKpackager|FCKpackager]]
 
When you feel the translation is completed and the tests are done, you will need to "re-generate" the compressed JavaScript files of FCKeditor using the [[FCKeditor 2.x/Developers Guide/Customization/Scripts Compression#Using the FCKpackager|FCKpackager]]
 +
 +
== File Encoding ==
 +
 +
'''NOTE''': An important thing is to save the files in the UTF-8 encoded text format. Otherwise, some strange characters could appear instead of any special characters used by different languages, like accented letters, symbols, etc.
 +
 +
== Publishing ==
 +
 +
A ticket must be opened at our [http://dev.fckeditor.net/ development web site] for each new or updated language file contribution.
 +
 +
Before starting a new translation, please take a look at [http://www.fckeditor.net/developers/ our web site] and check if there is no translator assigned to your language. Of course you can also [http://dev.fckeditor.net/search check] if there are no translations made already.

Latest revision as of 11:53, 23 January 2008

Interface Localization

The languages files must be placed inside the "editor/lang" directory of the project. You can use the file "en.js" as the base file for your translations. The file names are based on the RFC 3066 standards (but in lowercase) and the ISO 639-1. So, for example, a file for the Portuguese language should be called "pt.js".

Translation could also be localized for a specific country. In this case, for example, a Brazilian Portuguese translation file must be called "pt-br.js."

The browser’s language auto detection system uses the first available language that best fits the client settings.

For example, if a client computer is set to Brazilian Portuguese and there is no pt-br.js file available, the pt.js is used if available. If still not available, the default language is used (from the configuration file, by default English).

When creating new language files, you need to add an entry for it in the "editor/_source/internals/fcklanguagemanager.js" file. Something like this:

AvailableLanguages =
{
en : 'English',
pt : 'Portuguese'
}

To test your language file, you could run the editor using the source scripts. Just open the "_samples/html/sample03.html" files.

When you feel the translation is completed and the tests are done, you will need to "re-generate" the compressed JavaScript files of FCKeditor using the FCKpackager

File Encoding

NOTE: An important thing is to save the files in the UTF-8 encoded text format. Otherwise, some strange characters could appear instead of any special characters used by different languages, like accented letters, symbols, etc.

Publishing

A ticket must be opened at our development web site for each new or updated language file contribution.

Before starting a new translation, please take a look at our web site and check if there is no translator assigned to your language. Of course you can also check if there are no translations made already.

This page was last edited on 23 January 2008, at 11:53.