vue-phone-number-input
vue-phone-number-input copied to clipboard
Country names
Hi! Is there a way to translate country names?😢
https://github.com/LouisMazel/vue-phone-number-input/blob/master/src/VuePhoneNumberInput/assets/js/phoneCodeCountries.js
What is the best ? Each country in the language of the country?
What is the best ? Each country in the language of the country?
I think you should add language
prop with type Array
. Default value for the prop will be your array. So we can use it like this:
<template>
<VuePhoneNumberInput v-model="yourValue" :language="language" />
</template>
<script>
import { ru } from 'vue-phone-number-input/dist/locale'
export default {
data() {
return {
language: ru,
}
}
};
</script>
People can contribute their own translation to your project.
How can I clear the VuePhoneNumberInput after form submitting? I tried to make model to null but the green border still exits even the number disappears. Is there any way of doing it thanks 👍
@LouisMazel is there a way to translate the country names in the list?