gettext-i18n
Installation
SKILL.md
Gettext Internationalization
Gettext is the standard internationalization library for Elixir/Phoenix applications.
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