1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-04-11 03:02:30 +02:00

Language options always get extended with the initalisation object now - this allows you to use both a file source and the local script if you wanted. It also allows backwards compatiablity with language files that don't have the oAria namespace.

This commit is contained in:
Allan Jardine 2011-12-14 13:39:06 +00:00
parent 27488c4093
commit b235c64c2a
2 changed files with 2 additions and 4 deletions

View File

@ -6177,8 +6177,7 @@
oSettings.oLanguage.sUrl = oInit.oLanguage.sUrl; oSettings.oLanguage.sUrl = oInit.oLanguage.sUrl;
$.getJSON( oSettings.oLanguage.sUrl, null, function( json ) { $.getJSON( oSettings.oLanguage.sUrl, null, function( json ) {
_fnLanguageCompat( json ); _fnLanguageCompat( json );
$.extend( true, oSettings.oLanguage, json ); $.extend( true, oSettings.oLanguage, oInit.oLanguage, json );
console.log( oSettings.oLanguage);
_fnInitialise( oSettings ); _fnInitialise( oSettings );
} ); } );
bInitHandedOff = true; bInitHandedOff = true;

View File

@ -249,8 +249,7 @@ if ( oInit.oLanguage.sUrl !== "" )
oSettings.oLanguage.sUrl = oInit.oLanguage.sUrl; oSettings.oLanguage.sUrl = oInit.oLanguage.sUrl;
$.getJSON( oSettings.oLanguage.sUrl, null, function( json ) { $.getJSON( oSettings.oLanguage.sUrl, null, function( json ) {
_fnLanguageCompat( json ); _fnLanguageCompat( json );
$.extend( true, oSettings.oLanguage, json ); $.extend( true, oSettings.oLanguage, oInit.oLanguage, json );
console.log( oSettings.oLanguage);
_fnInitialise( oSettings ); _fnInitialise( oSettings );
} ); } );
bInitHandedOff = true; bInitHandedOff = true;