Skip to content

Commit 738d0fa

Browse files
authored
Merge pull request #7 from xiCO2k/feat/laravel-9
feat: Add Support to `Laravel 9`
2 parents 855cbe6 + 7a47842 commit 738d0fa

File tree

5 files changed

+1899
-1859
lines changed

5 files changed

+1899
-1859
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { createApp } from 'vue'
3232
import { i18nVue } from 'laravel-vue-i18n'
3333

3434
createApp()
35-
.use(i18nVue)
35+
.use(i18nVue, {
36+
resolve: lang => import(`../../lang/${lang}.json`),
37+
})
3638
.mount('#app');
3739
```
3840

@@ -48,12 +50,12 @@ createApp()
4850
### Plugin Options
4951

5052
- `lang` *(optional)*: if not provided it will try to find from the `<html lang="pt">` tag, if is not available it will default to `en`.
51-
- `resolve` *(optional)*: The way to reach your language files.
53+
- `resolve` *(required)*: The way to reach your language files.
5254

5355
```js
5456
createApp().use(i18nVue, {
5557
lang: 'pt',
56-
resolve: lang => import(`../lang/${lang}.json`),
58+
resolve: lang => import(`../../lang/${lang}.json`),
5759
})
5860
```
5961

0 commit comments

Comments
 (0)