labels with i18n module
bexter89 opened this issue · comments
Rebekah Cruz commented
Is it possible to pass a value to the 'label' field with the i18n module? Would love to get the table headers translated.
Lin Masahiro commented
Hi @bexter89 ,
You can change table's label value on anytime like this example.
const table = reactive({
isLoading: false,
columns: [
{
label: i18n.t("name"),
field: "id",
width: "3%",
sortable: true,
isKey: true,
},
],
...........
});
const switchLocale = (locale) => {
i18n.locale = locale;
table.columns[0].label = i18n.t("name");
}
Lin Masahiro commented
Hi, @bexter89 , is this issue resolved now? :)
Rebekah Cruz commented
@linmasahiro yes, thank you!!