Skip to content

Commit

Permalink
refactor(locale): rename by BCP-47 standard
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Nov 5, 2023
1 parent 5f6f04a commit 58be2dd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions frontend/src/utils/translation.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
"use client";
import i18n, { type Resource } from "i18next";
import { initReactI18next } from "react-i18next";
import translation_en from "@/../../locales/en.json";
import translation_ja from "@/../../locales/ja.json";
import dictEnUS from "@/../../locales/en-US.json";
import dictJaJP from "@/../../locales/ja-JP.json";

// The keys in RESOURCE are language tags according to the BCP-47 standard.
// See: https://partnerhub.warnermediagroup.com/metadata/languages
const resources = {
"en-US": {
translation: translation_en,
translation: dictEnUS,
},
"ja-JP": {
translation: translation_ja,
translation: dictJaJP,
},
} as const satisfies Resource;

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions locales/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Localization

This files in are language tags according to the BCP-47 standard.

- See:
[Content Partner Hub | BCP-47 Language Tags](https://partnerhub.warnermediagroup.com/metadata/languages)

0 comments on commit 58be2dd

Please sign in to comment.