Open nichesuch opened 3 months ago
if there is Japanese, Please translate
i18n.config.ts
messages: { ja: { ... brewery: "酒蔵", details: "詳細", ... }, en: { ... brewery: "Brewery", details: "Details", ... }, ...
<h1>酒蔵 詳細</h1>
<h1>{{ $t("brewery") }} {{ $t("details") }} </h1>
const columns = [ { key: "name", label: "名前", sortable: true, }, ]
const { t } = useI18n() ... const columns = [ { key: "name", label: t("name"), sortable: true, }, ]
nuxt.config.ts
i18n: { locales: [ ... { code: 'new', name: '新しい言語' }, ], }
messages: { ... new: { ... }, }
■追加■ Languageで外国語(英語)を選択。 Breweries→Addで情報を選択。 Add Breweryの指定情報が日本語のまま。 例:ふりがな、住所、都道府県(プルダウンも日本語)
if there is Japanese, Please translate
Internationalization file
i18n.config.ts
usage in template
before
after
usage in script
before
after
new language
nuxt.config.ts
i18n.config.ts