Plugin Bootstrap Table - English translation

Asked

Viewed 1,114 times

0

Hello! I believe I have done the plugin loading and translation correctly, but is not translating.

Can you help me ?

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • Is this just bootstrap Tables or datatables together ? if it is the missing datatables to inform the 'language', "language": { "url": "dataTables.Portuguese-Brasil.lang" }

  • @Anthraxisbr, this is bootstrap Tables. http://bootstrap-table.wenzhixin.net.cn/

  • a, then it is the locale you change, $('table'). bootstrapTable({locale:'pt-BR'}), defines in the table construction

  • Already started this way and did not work, in other forms works normally.

  • Have some other plugin that starts in this modal ?

  • Yes, for example: datepicker, datatables, Moment, toastr.

  • The datepicker keeps the translation ? puts the section of the js code that starts this part that is not working together in the question, probably having some conflict

Show 2 more comments

1 answer

0

Add translation js to your code after bootstrap-table js start.

 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.17.1/locale/bootstrap-table-pt-BR.js"></script>

in the modal onshown event, add the startup with Locale.

    Table.BootstrapTable({locale:'pt-br'})

Browser other questions tagged

You are not signed in. Login or sign up in order to post.