danielebarchiesi@0: danielebarchiesi@0: danielebarchiesi@0: danielebarchiesi@0:
danielebarchiesi@0:
danielebarchiesi@0: This sample shows how to automatically replace <textarea>
elements
danielebarchiesi@0: with a CKEditor instance with an option to change the language of its user interface.
danielebarchiesi@0:
danielebarchiesi@0: It pulls the language list from CKEditor _languages.js
file that contains the list of supported languages and creates
danielebarchiesi@0: a drop-down list that lets the user change the UI language.
danielebarchiesi@0:
danielebarchiesi@0: By default, CKEditor automatically localizes the editor to the language of the user.
danielebarchiesi@0: The UI language can be controlled with two configuration options:
danielebarchiesi@0:
danielebarchiesi@0: language
and
danielebarchiesi@0: defaultLanguage
. The defaultLanguage
setting specifies the
danielebarchiesi@0: default CKEditor language to be used when a localization suitable for user's settings is not available.
danielebarchiesi@0:
danielebarchiesi@0: To specify the user interface language that will be used no matter what language is
danielebarchiesi@0: specified in user's browser or operating system, set the language
property:
danielebarchiesi@0:
CKEDITOR.replace( 'textarea_id', danielebarchiesi@0: { danielebarchiesi@0: // Load the German interface. danielebarchiesi@0: language: 'de' danielebarchiesi@0: });danielebarchiesi@0:
danielebarchiesi@0: Note that textarea_id
in the code above is the id
attribute of
danielebarchiesi@0: the <textarea>
element to be replaced.
danielebarchiesi@0: