Vue-select: Feature request: all labels, titles, placeholders and so on are translatable

Created on 9 Dec 2020  路  2Comments  路  Source: sagalbot/vue-select

Hi, in multilanguage projects it's very usefull that every frase could translated.
So I'll appreciate, if you could make translatable all aria-labels, titles and another.
For example like a prop with object
{
deselectLabel: 'blablabla',
comboboxLabel: 'blablabla',
...
}

accessibility i18n

Most helpful comment

@kamerat a lot of progress was made on this with #988, but I was hit by a car shortly after and had to take most of the year off work. Haven't picked it back up, but it's one that's always been high on the list. If you take a look at the work there, let me know your thoughts. Getting this API out there would probably solve the aria label issues in #1331 as well.

All 2 comments

I guess props could fix this really easy, but as my personal experience, it would be annoying to add these on all pages I use vue-select, or create a proxy-component for it. Instead, it would be nice to be able to add these options globally.

@sagalbot it could be possible to create this fairly simple by adding plugin support for vue-select and adding options:

import Vue from "vue";
import vSelect from "vue-select";
Vue.use(vSelect, { i18n: { search: 'S酶k' } })

It might also be possible to spread the component before use and add overwriting i18n keys:

import Vue from "vue";
import vSelect from "vue-select";

Vue.component("v-select", { ...vSelect,  i18n: { search: 'S酶k' } });

_i18n could also be a prop with default values that one could also overwrite with the same pattern as above._

Thoughts?

@kamerat a lot of progress was made on this with #988, but I was hit by a car shortly after and had to take most of the year off work. Haven't picked it back up, but it's one that's always been high on the list. If you take a look at the work there, let me know your thoughts. Getting this API out there would probably solve the aria label issues in #1331 as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theseawolves picture theseawolves  路  4Comments

xuwenhao picture xuwenhao  路  3Comments

threeaccents picture threeaccents  路  3Comments

ducdev picture ducdev  路  3Comments

davidalvarezr picture davidalvarezr  路  3Comments