Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate Japanese #27

Open
nichesuch opened this issue Aug 5, 2024 · 1 comment
Open

Translate Japanese #27

nichesuch opened this issue Aug 5, 2024 · 1 comment
Labels
translate language translate
Milestone

Comments

@nichesuch
Copy link
Contributor

nichesuch commented Aug 5, 2024

if there is Japanese, Please translate

Internationalization file

i18n.config.ts

  messages: {
    ja: {
      ...
      brewery: "酒蔵",
      details: "詳細",
      ...
    },
    en: {
      ...
      brewery: "Brewery",
      details: "Details",
      ...
    },
    ...

usage in template

before

<h1>酒蔵 詳細</h1>

after

<h1>{{ $t("brewery") }} {{ $t("details") }} </h1>

usage in script

before

const columns = [
  {
    key: "name",
    label: "名前",
    sortable: true,
  },
]

after

const { t } = useI18n()

...

const columns = [
  {
    key: "name",
    label: t("name"),
    sortable: true,
  },
]

new language

nuxt.config.ts

  i18n: {
    locales: [
      ...
      {
        code: 'new',
        name: '新しい言語'
      },
    ],
  }

i18n.config.ts

  messages: {
    ...
    new: {
      ...
    },
  }
@nichesuch nichesuch added the help wanted Extra attention is needed label Aug 16, 2024
@nichesuch nichesuch added this to the Nuxt3 Release milestone Aug 22, 2024
@youkey0211
Copy link

■追加■
Languageで外国語(英語)を選択。
Breweries→Addで情報を選択。
Add Breweryの指定情報が日本語のまま。
例:ふりがな、住所、都道府県(プルダウンも日本語)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translate language translate
Projects
None yet
Development

No branches or pull requests

2 participants