Skip to content

Commit

Permalink
Merge pull request #7 from xiCO2k/feat/laravel-9
Browse files Browse the repository at this point in the history
feat: Add Support to `Laravel 9`
  • Loading branch information
xiCO2k authored Jan 18, 2022
2 parents 855cbe6 + 7a47842 commit 738d0fa
Show file tree
Hide file tree
Showing 5 changed files with 1,899 additions and 1,859 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ import { createApp } from 'vue'
import { i18nVue } from 'laravel-vue-i18n'

createApp()
.use(i18nVue)
.use(i18nVue, {
resolve: lang => import(`../../lang/${lang}.json`),
})
.mount('#app');
```

Expand All @@ -48,12 +50,12 @@ createApp()
### Plugin Options

- `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`.
- `resolve` *(optional)*: The way to reach your language files.
- `resolve` *(required)*: The way to reach your language files.

```js
createApp().use(i18nVue, {
lang: 'pt',
resolve: lang => import(`../lang/${lang}.json`),
resolve: lang => import(`../../lang/${lang}.json`),
})
```

Expand Down
Loading

0 comments on commit 738d0fa

Please sign in to comment.