Use onMounted to change locale

pull/1021/head
Cagatay Civici 2021-02-18 13:03:35 +03:00
parent 041cfbf232
commit 118e0fcd3c
1 changed files with 5 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export default {
<h6>Composition API</h6>
<pre v-code.script><code>
import { defineComponent } from "vue";
import { defineComponent, onMounted } from "vue";
import { usePrimeVue } from "primevue/config";
export default defineComponent({
@ -55,6 +55,10 @@ export default defineComponent({
primevue.config.locale.accept = 'Aceptar';
primevue.config.locale.reject = 'Rechazar';
}
onMounted(() => {
changeToSpanish();
})
}
});