locale-picker

A ready-made language switcher for applications whose interface is translated into multiple languages. It remembers the selected language and applies it to pages and LiveViews, which are interactive server-rendered screens in Phoenix.

In plain words
What is it for?
Use it when users need to change the interface language while the app is running. It is intended for Elixir Phoenix apps using Gettext translations.
Why use it?
It avoids building the language-selection control, saved preference, and request wiring yourself.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fullstack-phoenix/saas_kit/locale-picker
Any agent
npx skills add fullstack-phoenix/saas_kit --skill locale-picker
Clone the repo
git clone --depth 1 https://github.com/fullstack-phoenix/saas_kit

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,071 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.01071
Opus 5 $0.00020 $0.00535
Sonnet 5 $0.00008 $0.00214
Haiku 4.5 $0.00004 $0.00107

Measured 2d ago against content hash c41d0d767988, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

locale-picker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/locale-picker/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Locale Picker

Adds a runtime language switcher. Generates a MyAppWeb.Locale plug + LiveView on_mount hook that resolves the active locale (query param → cookie/session → current user → default), a LocalePickerLive dropdown rendered through a portal, and a JS hook to redirect on selection. Locale choice persists in a cookie and flows into Gettext for every request and LiveView.

When to use

  • The app ships UI in more than one language and users should pick their own.
  • You already use (or are willing to use) Gettext for translations.
  • Don't reach for this for a single-language app, or when locale is fixed per tenant and never user-selectable — a static Gettext.put_locale/2 is enough.

Dependencies

  • Requires: None.
  • Recommended: None. The layouts boilerplate option lets the installer drop the picker into the generated app, public, and session layouts automatically.

Install

mix saaskit.feature.install locale_picker

No interactive decisions. Layout injection (instructions gi) only runs when the boilerplate was generated with the layouts option; otherwise mount the picker target yourself (see Tweaking). The install also runs mix gettext.extract.

What it generates

  • lib/my_app_web/locale.ex — the MyAppWeb.Locale module: set_locale/2 plug, on_mount(:set_locale, ...), plus known_locales/0 and current_locale/0.
  • lib/my_app_web/live/locale_picker_live.exLocalePickerLive, the dropdown rendered via <.portal target="#locale-target">.
  • assets/js/hooks/locale_picker.jsLocalePicker hook (registered in assets/js/hooks/index.js) that reports the current URL and handles redirects.
  • test/my_app_web/live/locale_picker_live_test.exs — LiveView tests.
  • Router wiring: imports set_locale/2, adds plug :set_locale to the browser pipeline, and prepends {MyAppWeb.Locale, :set_locale} to the LiveView on_mount list.
  • Mounts live_render(@conn, MyAppWeb.LocalePickerLive, ...) at the end of root.html.heex and adds <div id="locale-target"> to the layouts.

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 108 lines · 40 tokens per session scan A c41d0d767988

Subscribe to this mod's changes

locale-picker is a skill published in the GitHub repository fullstack-phoenix/saas_kit (2 stars, last pushed 2mo ago), licensed MIT. It adds 40 tokens to every session and 1,071 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

dsh-translate-docs

Manually run the extended DeepSeek Harness bilingual-document workflow, including generated briefings, delegated prose translation, whole-document translation, and scoped pairing verification.

deepseek-ai/deepseek-harness · 37 tokens

i18n-localization

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

vudovn/ag-kit · 27 tokens

translate-skill

将 mattpocock/skills 的内容翻译、刷新或复核到简体中文本地化仓库 vinvcn/mattpocock-skills-zh-CN 时使用这个项目级 skill。适用于 skill files、README content、CLAUDE.md、CONTEXT.md、docs,以及其他需要保留行为关键 identifiers 的上游用户可见内容。.

vinvcn/mattpocock-skills-zh-CN · 84 tokens

seedance-vocab-ja

This skill should be used when the user asks for Japanese Seedance 2.0 prompt wording, Japanese cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into Japanese.

Emily2040/seedance-2.0 · 50 tokens

asc-subscription-localization

Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.

rorkai/app-store-connect-cli-skills · 60 tokens

harden

Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready.

childrentime/reactuse · 32 tokens