X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fplugins.js;h=3dfbd127153bc54270602f4b02f5db4e54262c7d;hb=4e90e78dc97789709ee7404359a5517540c27553;hp=77f04a44ee53a37d9c992989085d43608442cdb5;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/core/plugins.js b/_source/core/plugins.js index 77f04a4..3dfbd12 100644 --- a/_source/core/plugins.js +++ b/_source/core/plugins.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -79,7 +79,11 @@ CKEDITOR.plugins.load = CKEDITOR.tools.override( CKEDITOR.plugins.load, function CKEDITOR.plugins.setLang = function( pluginName, languageCode, languageEntries ) { var plugin = this.get( pluginName ), - pluginLang = plugin.lang || ( plugin.lang = {} ); + pluginLangEntries = plugin.langEntries || ( plugin.langEntries = {} ), + pluginLang = plugin.lang || ( plugin.lang = [] ); - pluginLang[ languageCode ] = languageEntries; + if ( CKEDITOR.tools.indexOf( pluginLang, languageCode ) == -1 ) + pluginLang.push( languageCode ); + + pluginLangEntries[ languageCode ] = languageEntries; };