vue3-easy-data-table
vue3-easy-data-table copied to clipboard
Localization
I like vu3-easy-data-table. Since we need to handle multiple languages (English and French for us), I would be willing to translate the labels. I use vue-i18n which can be used for the colums titles, but the built-in labels would need to be variables.
If this is something you are interested in, just let me know.
The built-in labels can be altered by props: you can change the text by passing a value for given label
<EasyDataTable
...
rowsPerPageMessage="your own text"
emptyMessage="or i18n translation"
>
However I haven't found this in the documentation but rather in source code of this lib (object propsWithDefault
), so that could be improved 🙂
Thank you for sharing it. I could change the values to spanish. Here are the parameters I changed:
<EasyDataTable
:headers="labels"
:items="values"
show-index
alternating
buttons-pagination
rowsPerPageMessage="Filas por página"
rowsOfPageSeparatorMessage="de"
emptyMessage="No hay datos disponibles"
>