Translation of DataTables

DataTables include some GUI texts that are english by default but can be translated in all other languages.

These Texts can be translated

The translation table has to bee added to the jQuery(…).dataTable() call, which is usually in the footer of the list template. Go to Manage Templates -> List Templates tab and click on a template to edit. Replace the code in the footer textbox with this for Swedish translation:


</tbody>
</table>
<script type="text/javascript" charset="utf-8">
jQuery(document).ready(function() {
jQuery('#wpfb-data-table-%uid%').dataTable({"oLanguage":
{
"sEmptyTable": "Tabellen innehåller ingen data",
"sInfo": "Visar _START_ till _END_ av totalt _TOTAL_ rader",
"sInfoEmpty": "Visar 0 till 0 av totalt 0 rader",
"sInfoFiltered": "(filtrerade från totalt _MAX_ rader)",
"sInfoPostFix": "",
"sInfoThousands": ",",
"sLengthMenu": "Visa _MENU_ rader",
"sLoadingRecords": "Laddar...",
"sProcessing": "Bearbetar...",
"sSearch": "Sök:",
"sZeroRecords": "Hittade inga matchande resultat",
"oPaginate": {
"sFirst": "Första",
"sLast": "Sista",
"sNext": "Nästa",
"sPrevious": "Föregående"
},
"oAria": {
"sSortAscending": ": aktivera för att sortera kolumnen i stigande ordning",
"sSortDescending": ": aktivera för att sortera kolumnen i fallande ordning"
}
}
});
});
</script>

Other languages are available here: http://datatables.net/plug-ins/i18n

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

3 thoughts on “Translation of DataTables

  1. VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi,
    I have upgraded to pro. This translation code breaks the backend for management of the template for “file pages”. The menu item for file pages disapears, and you have to disable javascript to make it apear again.

    Best regards,

    John-Petter Karlsen

  2. stephan says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    When translate to Dutch the number of files is on 10 default. Somehow I can’t change the number to show. re-adding the table will not work! Please some help here! Thanks!! 🙂

  3. armin says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Couldn’t find this option in new version.

Leave a Reply

Your email address will not be published. Required fields are marked *