Plugin Author
Meitar
(@meitar)
When I try using
{
"language": {
"lengthMenu": "Mostrando _MENU_ itens por pagina",
"zeroRecords": "Sem dados no momento",
"info": "Mostrando pagina _PAGE_ de _PAGES_",
"infoEmpty": "Dados indisponiveis"
}
}
I have no problems, so I suspect the issue is one of the other settings of your tables.
Did you include a link to your site, so that others can see the problem??
Thread Starter
mslino
(@mslino)
Hi Meitar,
I tried to use only the above code, but still the same. I can’t get it translated. You can see it at http://www.atcbsb.com.br/wp/dados/
Only the bellow options are working.
“paging”: true,
“ordering”: false,
“info”: false,
Marcio
Thread Starter
mslino
(@mslino)
Data is coming from mysql database…
Plugin Author
Meitar
(@meitar)
You might consider changing the lang attribute of the shortcode. Your WordPress website is set to use the English language. I can tell because the HTML produced from your shortcode includes this:
<table role="grid" id="igsv-6e658cca59e790835494557a6807f2f2" class="igsv-table dataTable no-footer dtr-inline" summary="Google Spreadsheet" title="" style="" lang="en-US">
I’m not actually sure if that’s necessary, because, again, I was able change the language with the DataTables defaults object, so I can’t reproduce the problem you’re having.
Data is coming from mysql database…
That doesn’t make any difference as far as the DataTables front-end is concerned.
Thread Starter
mslino
(@mslino)
Hi Meitar,
I have changed the default language to PT-BR and now I have labels in Portuguese. Despite that, I can’t be able to change columns names using the datatables object bellow.
“columnDefs”: [
{
“name”: “Mode-S”,
“targets”: 0
},
{
“name”: “Voo”,
“targets”: 1
},
{
“name”: “Prefixo”,
“targets”: 2
},
{
“name”: “Tipo”,
“targets”: 3
},
{
“name”: “Modelo”,
“targets”: 4
},
{
“name”: “Data”,
“targets”: 5
},
{
“name”: “Hora”,
“targets”: 6
}
What do you recommend? I was thinking to remove and reinstall the plugin.
Marcio
Plugin Author
Meitar
(@meitar)
You are misunderstanding what the columns.name option is for. It doesn’t change the cell text, it just gives the column a name in the API.
Like I said, the language options are working fine, but you are trying to change the content of the table. You can only do this by, you know, changing the content of the spreadsheet.