the industrial

ブログと言うより自分のためのメモ以外の何モノでもないです。でも読んでくださってありがとうございます。

nuxt-i18n

nuxt-i18n tips

github.com ちょっと詰まった箇所をメモしておく。 現在の Locale を取得したい <template> <div> <h1>{{ $i18n.locale }}</h1> </div> </template> <script> export default { mounted() { this.$i18n.locale } } </script> Script 内部で利用したい <template> <div> <h1>{{ name }}</h1> </div> </template> <i18n> ## language=yaml en: name: "omiend" ja:…</i18n>