We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
loadLanguageAsync
1 parent 218f762 commit 0c00d44Copy full SHA for 0c00d44
README.md
@@ -54,7 +54,7 @@ createApp().use(i18nVue, {
54
})
55
```
56
57
-### trans()
+### `trans()`
58
59
The `trans()` method can be used on
60
@@ -71,3 +71,16 @@ trans('Welcome!'); // Bem-vindo!
71
trans('Welcome, :name!', { name: 'Francisco' }) // Bem-vindo Francisco!
72
trans('Welcome, :NAME!', { name: 'Francisco' }) // Bem-vindo FRANCISCO!
73
74
+
75
+### `loadLanguageAsync()`
76
77
+The `loadLanguageAsync()` can be used to change the location during the runtime.
78
79
+```jsx
80
+import { loadLanguageAsync } from 'laravel-vue-i18n';
81
82
+<template>
83
+ <div>{{ $t('Welcome!') }}</div>
84
+ <button @click="() => loadLanguageAsync('pt')">Change to Portuguese Language</button>
85
+</template>
86
+```
0 commit comments