LogoSkills

i18n

Slang-based internationalization (i18n) translation management

ํ•ญ๋ชฉ๋‚ด์šฉ
Invoke/i18n
Aliases/i18n:add, /translate, /locale
Categorypetmedi-development
Complexitymoderate
MCP Serversserena, context7

/i18n#

Context Framework Note: Activated for internationalization and multilingual support tasks.

Triggers#

  • When adding new translation keys
  • When managing multilingual text
  • When using context.t.* patterns

Context Trigger Pattern#

/i18n {action} {key_path} [--options]

Parameters#

ParameterRequiredDescriptionExample
action โœ… Action to perform add, update, check
key_path โœ… Translation key path home.welcome, auth.login
--koโŒKorean text"ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค"
--enโŒEnglish text"Welcome"
--pluralโŒPluralization handlingtrue

File Structure#

shared/i10n/lib/
โ”œโ”€โ”€ translations/
โ”‚   โ”œโ”€โ”€ strings.i18n.yaml      # Base (Korean)
โ”‚   โ””โ”€โ”€ strings_en.i18n.yaml   # English
โ””โ”€โ”€ src/
    โ””โ”€โ”€ translations/
        โ””โ”€โ”€ translations.g.dart # Generated code

Translation File Format#

Basic Structure#

# shared/i10n/lib/translations/strings.i18n.yaml
common:
  appName: ํŽซ๋ฉ”๋””
  ok: ํ™•์ธ
  cancel: ์ทจ์†Œ
  save: ์ €์žฅ
  loading: ๋กœ๋”ฉ ์ค‘...
  error: ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค

auth:
  login: ๋กœ๊ทธ์ธ
  logout: ๋กœ๊ทธ์•„์›ƒ
  signUp: ํšŒ์›๊ฐ€์ž…
  email: ์ด๋ฉ”์ผ
  password: ๋น„๋ฐ€๋ฒˆํ˜ธ

Placeholders#

user:
  greeting:  ' $name๋‹˜, ์•ˆ๋…•ํ•˜์„ธ์š”! ' 
   points:  ' $count ํฌ์ธํŠธ ๋ณด์œ  ' 
   joinDate:  ' $date์— ๊ฐ€์ž… '

Pluralization#

items:
  count(param=n):
    zero: ํ•ญ๋ชฉ ์—†์Œ
    one: ํ•ญ๋ชฉ 1๊ฐœ
    other: ํ•ญ๋ชฉ $n๊ฐœ

messages:
  unread(param=count):
    zero: ์ฝ์ง€ ์•Š์€ ๋ฉ”์‹œ์ง€ ์—†์Œ
    one: ์ฝ์ง€ ์•Š์€ ๋ฉ”์‹œ์ง€ 1๊ฐœ
    other: ์ฝ์ง€ ์•Š์€ ๋ฉ”์‹œ์ง€ $count๊ฐœ

Context-Based#

pet:
  type(context=PetType):
    dog: ๊ฐ•์•„์ง€
    cat: ๊ณ ์–‘์ด
    bird: ์ƒˆ

Code Usage#

Basic Usage#

// Using BuildContext extension
Text(context.t.common.appName)
Text(context.t.auth.login)
Text(context.t.home.title)

Placeholders#

Text(context.t.user.greeting(name: user.name))
Text(context.t.user.points(count: user.points.toString()))

Pluralization#

Text(context.t.items.count(n: itemCount))
Text(context.t.messages.unread(count: unreadCount))

Commands#

# Generate translation code
melos run generate:locale

# GPT auto-translation (English)
melos run generate:locale:gpt

# Check for missing translations
dart run slang analyze

Core Rules#

Naming Conventions#

  • Use nested structures: user.profile.title
  • Use camelCase
  • Use meaningful key names

Translation Rules#

  • All UI text must use translation keys
  • Hard-coded strings are prohibited
  • Pluralization must always be handled

Code Generation#

  • Run melos run generate:locale after modifying translation files
  • Do not manually edit generated code

MCP Integration#

StepMCP ServerPurpose
Pattern analysisContext7slang documentation
Code searchSerenaReference existing translation patterns

Examples#

Add New Translation#

/i18n add home.newFeature --ko  " ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ "   --en  " New Feature "

Add Plural Translation#

/i18n add cart.itemCount --ko  " ์ƒํ’ˆ "   --en  " item "   --plural

Check Missing Translations#

/i18n check

References#

  • Detailed implementation: .claude/agents/i18n.md
  • Translation files: shared/i10n/lib/translations/