add-translation

star 0

Add new translations to the language context and update types

khaphong229 By khaphong229 schedule Updated 1/23/2026

name: add-translation description: Add new translations to the language context and update types

Adding Translations

1. Update Context

Edit context/language-context.tsx:

const translations = {
  en: {
    // ...existing
    "new.key": "New Value in English",
  },
  vi: {
    // ...existing
    "new.key": "Giá trị mới tiếng Việt",
  }
}

2. Usage

const { t } = useLanguage()
<span>{t("new.key")}</span>

3. Rules

  • Keys must be identical in both languages.
  • Use dot notation for nested keys if applicable.
Install via CLI
npx skills add https://github.com/khaphong229/blog-basic --skill add-translation
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator