localizations.md 2.1 KB

Localizations []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/localizations.md)



PS:

Podemos importar all locale files lo que necesita:

<script src="bootstrap-table-en-US.js"></script>
<script src="bootstrap-table-zh-CN.js"></script>
...

Y luego utilice este código JavaScript para cambiar el lenguaje:

$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['en-US']);
// $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
// ...

O utilice los data attributes para configurar el lenguaje:

<table data-toggle="table" data-locale="en-US">
</table>

O utilice este JavaScript para configurar el lenguaje:

$('table').bootstrapTable({locale:'en-US'});
Nombre Parámetro Valor por defecto
formatLoadingMessage - 'Loading, please wait…'
formatRecordsPerPage pageNumber '%s records per page'
formatShowingRows pageFrom, pageTo, totalRows 'Showing %s to %s of %s rows'
formatDetailPagination totalRows 'Showing %s rows'
formatSearch - 'Search'
formatNoMatches - 'No matching records found'
formatRefresh - 'Refresh'
formatToggle - 'Toggle'
formatColumns - 'Columns'
formatAllRows --/td> 'All'
formatFullscreen - 'Fullscreen'