Rumantsch translation for DataTables
- Author: ULR Uniun Littaratura Rumantscha https://litteraturarumantscha.ch
- Author: translation: Benedetto Vigne
- Author: language pack: Christian Spescha
Use
There are a number of ways to make use of this translation in your DataTables.
Browser loading / CDN
Loading DataTables' language information directly in the browser is done with the .json
file:
You DataTables initialisation might look like this:
var table = new DataTable('#myTable', {
language: {
url: '//cdn.datatables.net/plug-ins/2.3.0/i18n/rm.json',
},
});
ES modules
If you are using ES modules (e.g. with Vite or similar bundler), then can use the datatables.net-plugins
package (.mjs
files), which this translation is available in. In such a case your initialisation code might look like:
import DataTable from 'datatables.net';
import language from 'datatables.net-plugins/i18n/rm.mjs';
var table = new DataTable('#myTable', {
language,
});
CommonJS
If you are using CommonJS (i.e. in an older version of Node or Webpack), the translation files can be loaded in from the .js
files which will return the JSON structure for the translation (note that unlike the other DataTables plug-ins it does not return a function to be executed - just a JSON object):
var $ = require('jquery');
var DataTable = require('datatables.net')(window, $);
var language = require('datatables.net-plugins/i18n/rm.js');
var table = new DataTable('#myTable', {
language: language,
});
Plug-in code
{
"emptyTable": "Naginas endataziuns",
"info": "_START_ fin _END_ da _TOTAL_ endataziuns",
"infoEmpty": "Naginas endataziuns",
"infoFiltered": "(filtrà da _MAX_ endataziuns)",
"infoThousands": ".",
"lengthMenu": "_MENU_ Dumber da cumparsas",
"loadingRecords": "vegn chargià ..",
"processing": "Spetgar p.pl...",
"search": "Tschertga",
"zeroRecords": "Naginas endataziuns.",
"paginate": {
"first": "Emprima",
"previous": "Anavos",
"next": "Proxima",
"last": "Ultima"
},
"aria": {
"sortAscending": ": activar per zavrar las colonnas ensi",
"sortDescending": ": activar per zavrar las colonnas engiu"
},
"select": {
"rows": {
"_": "%d lingias selecziunadas",
"1": "1 lingia selecziunada"
}
},
"buttons": {
"print": "Stampar",
"colvis": "Colonnas",
"copy": "Copiar",
"copyTitle": "Copiar en l'archiv provisoric",
"copyKeys": "Tasta <i>ctrl<\/i> u <i>⌘<\/i> + <i>C<\/i> per copiar<br>la tabella en l'arcun provisoric.<br><br>Per interrumper cliccar il messadi u smatgar Escape",
"copySuccess": {
"_": "%d lingias copiadas",
"1": "1 lingia copiada"
},
"pageLength": {
"-1": "Mussar tut las lingias",
"_": "Mussar %d lingias"
}
}
}
Contributing
If you have any ideas for how this plug-in can be improved please go to the translations plug-ins page and click the Contribute button to submit corrections and additions.