Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getLanguage() {
- var $langMap = {
- en: 'English',
- es: 'Spanish'
- };
- var $lang = $('html').attr('lang');
- return '//cdn.datatables.net/plug-ins/1.10.13/i18n/' + $langMap[$lang] + '.json';
- }
- // Build Datatable
- $('#example').DataTable({
- language: {
- url: getLanguage() // works perfectly, but I need to overwrite with a few custom text options
- }
- });
- en: {
- // Overwrite defaults with this string
- "lengthMenu": "Display _MENU_ records per page - custom test",
- },
- es: {
- // Overwrite Spanish defaults with this string
- "lengthMenu": "Mostrar _MENU_ registros - algo muy especial...",
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement