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:
Santhosh Thottingal authored and Gerrit Code Review committed 2013-05-27 09:54:03 +00:00
1 parent c4536a063c
commit 540ada592d
1 file changed
+9 -4
+9 -4
View File
@@ -111,10 +111,15 @@
*/
function i18nInit() {
var extensionPath, locales, i18n;
extensionPath = mw.config.get( 'wgExtensionAssetsPath' ) +
'/UniversalLanguageSelector/';
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' ) +
'/UniversalLanguageSelector/';
}
locales = mw.config.get( 'wgULSi18nLocales' );
i18n = $.i18n( {
locale: currentLang,