Skip to content
Permalink
Browse files

Merge branch 't/11911'

  • Loading branch information...
mlewand committed May 9, 2014
2 parents 81dc623 + d320698 commit 5b1b8ed65b3e4b6ae211a3db18c78199b947d172
Showing with 12 additions and 10 deletions.
  1. +1 −0 CHANGES.md
  2. +11 −10 core/lang.js
@@ -4,6 +4,7 @@ CKEditor 4 Changelog
## CKEditor 4.4.1

Fixed Issues:
* [#11911](http://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for preloaded language in [CKEDITOR.lang](http://docs.ckeditor.com/#!/api/CKEDITOR.lang).
* [#9661](http://dev.ckeditor.com/ticket/9661): Added optional, [configurable](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-linkJavaScriptLinksAllowed) possibility to set JavaScript code in `href` attribute in anchor tags.
* [#11809](http://dev.ckeditor.com/ticket/11809): Set indentation to four spaces in [Code Snippet](http://ckeditor.com/addon/codesnippet) sample.
* [#11223](http://dev.ckeditor.com/ticket/11223): Fixed: issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the title element.
@@ -4,8 +4,6 @@
*/

( function() {
var loadedLangs = {};

/**
* Stores language-related functions.
*
@@ -16,7 +14,7 @@
/**
* The list of languages available in the editor core.
*
* alert( CKEDITOR.lang.en ); // 1
* alert( CKEDITOR.lang.languages.en ); // 1
*/
languages: { af: 1, ar: 1, bg: 1, bn: 1, bs: 1, ca: 1, cs: 1, cy: 1, da: 1, de: 1, el: 1,
'en-au': 1, 'en-ca': 1, 'en-gb': 1, en: 1, eo: 1, es: 1, et: 1, eu: 1, fa: 1, fi: 1, fo: 1,
@@ -49,13 +47,16 @@
if ( !languageCode || !CKEDITOR.lang.languages[ languageCode ] )
languageCode = this.detect( defaultLanguage, languageCode );

if ( !this[ languageCode ] ) {
CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( 'lang/' + languageCode + '.js' ), function() {
this[ languageCode ].dir = this.rtl[ languageCode ] ? 'rtl' : 'ltr';
callback( languageCode, this[ languageCode ] );
}, this );
} else
callback( languageCode, this[ languageCode ] );
var that = this,
loadedCallback = function() {
that[ languageCode ].dir = that.rtl[ languageCode ] ? 'rtl' : 'ltr';
callback( languageCode, that[ languageCode ] );
};

if ( !this[ languageCode ] )
CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( 'lang/' + languageCode + '.js' ), loadedCallback, this );
else
loadedCallback();
},

/**

0 comments on commit 5b1b8ed

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.