exanpe / exa-grails-plugins

Apache License 2.0
7 stars 4 forks source link

Change langage #9

Closed velo6raptor closed 7 years ago

velo6raptor commented 7 years ago

I'd like to change the english labels search, show ... in french, how can i do ?

lguerin commented 7 years ago

Actually, the tag does not support i18n plugin provided by datatables.js lib, but you can set the labels like this (regarding the documentation https://datatables.net/reference/option/language) :

<exa:datatable id="demo" items="${data}" auto="false"/>

<script type="text/javascript" charset="utf-8">
  $(document).ready(function() {
    var datatable = Exa.Datatable.getDatatable('demo');
    var options = {
      language: {
        search: "Rechercher :",
        lengthMenu: "Afficher _MENU_ résultat(s)"
      }
    };
    datatable.render(options);
  });
</script>
velo6raptor commented 7 years ago

It Works ! thanks a lot, tell me when the plugin support i18n