Skip to content

Commit

Permalink
fix(i18n): correct moment usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Oct 6, 2022
1 parent 2a44430 commit 8b05be2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nuxt/plugins/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineNuxtPlugin } from '#app'

export default defineNuxtPlugin((nuxtApp) => {
const { $moment } = nuxtApp

nuxtApp.$i18n.onLanguageSwitched = (
_oldLocale: string,
newLocale: string
) => {
const { $moment } = nuxtApp

$moment.locale(newLocale)
}
})

0 comments on commit 8b05be2

Please sign in to comment.