vue3-easy-data-table icon indicating copy to clipboard operation
vue3-easy-data-table copied to clipboard

Localization

Open agelinas opened this issue 1 year ago • 2 comments

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.

agelinas avatar Jul 06 '23 03:07 agelinas

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 🙂

kubohrdlicka avatar Jul 11 '23 13:07 kubohrdlicka

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"
>

Tisandg avatar Jul 26 '23 15:07 Tisandg