Access i18n json files from same domain for IE8 and IE9
IE8 and IE9 does not support ajax with CORS. So make sure they load json files from same domain. See http://bugs.jquery.com/ticket/8283 Bug: 45958 Change-Id: I8442a5efbd4ca7db0f0a407ff94772ea8e213b29
This commit is contained in:
committed by
Gerrit Code Review
parent
c4536a063c
commit
540ada592d
@@ -111,10 +111,15 @@
|
|||||||
*/
|
*/
|
||||||
function i18nInit() {
|
function i18nInit() {
|
||||||
var extensionPath, locales, i18n;
|
var extensionPath, locales, i18n;
|
||||||
|
if ( window.XDomainRequest ) {
|
||||||
|
// IE8 and IE9 does not support ajax with CORS. So make sure they
|
||||||
|
// load json files from same domain ( http://bugs.jquery.com/ticket/8283 )
|
||||||
|
extensionPath = mw.config.get( 'wgScriptPath' ) +
|
||||||
|
'/extensions/UniversalLanguageSelector/';
|
||||||
|
} else {
|
||||||
extensionPath = mw.config.get( 'wgExtensionAssetsPath' ) +
|
extensionPath = mw.config.get( 'wgExtensionAssetsPath' ) +
|
||||||
'/UniversalLanguageSelector/';
|
'/UniversalLanguageSelector/';
|
||||||
|
}
|
||||||
locales = mw.config.get( 'wgULSi18nLocales' );
|
locales = mw.config.get( 'wgULSi18nLocales' );
|
||||||
i18n = $.i18n( {
|
i18n = $.i18n( {
|
||||||
locale: currentLang,
|
locale: currentLang,
|
||||||
|
|||||||
Reference in New Issue
Block a user