Documentation
¶
Overview ¶
Package i18n provides GoForge's bilingual (English/Spanish) message catalogs for human-facing CLI output.
Scope rules (see plan_traduccion.go):
- Only text GoForge prints itself is translated. Cobra's help templates, --json output, engine errors, and migration names are intentionally left in English.
- The language is resolved once at startup (Rule A): --lang flag > GOFORGE_LANG > language: in goforge.yaml > LC_ALL/LANG > "en".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
Resolve picks the display language following Rule A of the i18n plan:
explicit (--lang) > GOFORGE_LANG > fromConfig (goforge.yaml) > LC_ALL > LANG > "en"
fromConfig may be empty when no config was loaded (e.g. goforge init, goforge version, or a broken goforge.yaml).
func SetLanguage ¶
func SetLanguage(lang string)
SetLanguage activates the catalog for lang. Non-English catalogs are merged over English, so a key missing its translation falls back to the English text instead of breaking output. Anything that is not recognized as Spanish resolves to English.
Types ¶
Click to show internal directories.
Click to hide internal directories.