{# Locale switcher macro — #955 cycle 6. Renders a small
that POSTs the user's chosen locale to /_dazzle/i18n/locale. The router validates against the project's `supported_locales` allow-list, sets the `dazzle_locale` cookie, and refreshes the page (HX-Refresh on htmx; 303 redirect on plain POST). Usage: {% from 'macros/locale_switcher.html' import render_locale_switcher %} {{ render_locale_switcher() }} The macro reads `request.state.locale` (current locale) and `request.state.locale_supported` (frozenset of supported tags) set by LocaleMiddleware, so projects don't have to thread either through their template context. Arguments: label — visible