gettext-i18n
Installation
SKILL.md
Gettext Internationalization
Canonical FP bar: docs/fcis-engineering-rules.md — Functional Core, Imperative Shell: pure domain modules; side effects at edges. HTTP/email/i18n adapters are edges; keep request building and response mapping pure where possible.
End-to-End Workflow
- Add Gettext calls — wrap strings with
gettext/1,dgettext/2, orngettext/3in templates, LiveView, and controllers - Extract strings — run
mix gettext.extract --mergeto generate/update.potand.pofiles - Verify
.pofiles — confirm newmsgidentries appear with emptymsgstrvalues - Add translations — fill in
msgstrvalues for each target locale - Set locale per request — configure a plug or LiveView mount to call
Gettext.put_locale/2 - Test — assert translated strings appear when locale is set