Skip to content

Commit

Permalink
fix(nuxt-app): add i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Haberkamp committed Jan 8, 2025
1 parent e20bb47 commit b4341db
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 25 deletions.
3 changes: 2 additions & 1 deletion examples/nuxt-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"@shopware-ag/meteor-component-library": "workspace:*",
"nuxt": "^3.10.3",
"vue": "^3.5.0",
"vue-router": "^4.3.0"
"vue-router": "^4.3.0",
"vue-i18n": "^9.9.1"
},
"devDependencies": {
"@playwright/test": "^1.45.0",
Expand Down
11 changes: 11 additions & 0 deletions examples/nuxt-app/plugins/i18n.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createI18n } from "vue-i18n";

export default defineNuxtPlugin(({ vueApp }) => {
const i18n = createI18n({
legacy: false,
globalInjection: true,
locale: "en",
});

vueApp.use(i18n);
});
58 changes: 34 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b4341db

Please sign in to comment.