Wire this application into ash_gettext.
mix ash_gettext.install # preview every edit
mix ash_gettext.install --apply # write them
mix ash_gettext.install --backend MyApp.Gettext --resolver MyApp.LocaleResolverFor each Ash domain it adds the AshGettext.Domain extension and a
gettext do block naming this app's Gettext backend. A domain that already
has the extension is skipped, so re-running is safe.
Options
--backend— the Gettext backend to translate against. Detected from the project when there is exactly oneuse Gettext.Backend.--resolver— the module implementingAshGettext.Locale.Resolverthat each domain names. Defaults toLocaleResolverin the backend's namespace, such asMyApp.LocaleResolver.--text-domain— defaults toash, so the texts go toash.pot.--apply— write the changes. Without it, nothing is written.
What this cannot do for you
The resolver module. Translating to the signed-in user's saved language needs code that knows where this app stores that, and a generic library must not assume it. The task prints a module to copy; write it, because the build fails until it exists.