# `Localize.VerifiedRoutes`
[🔗](https://github.com/kipcole9/localize_web/blob/main/lib/localize/routes/verified_routes.ex#L1)

Localized verified routes using the `~q` sigil.

This module provides compile-time verified localized routes. Instead of configuring with `use Phoenix.VerifiedRoutes`, configure instead:

    use Localize.VerifiedRoutes,
      router: MyApp.Router,
      endpoint: MyApp.Endpoint,
      gettext: MyApp.Gettext

When configured, the sigil `~q` is made available to express localized verified routes. Sigil `~p` remains available for non-localized verified routes.

The `~q` sigil generates a `case` statement that dispatches to the appropriate localized `~p` route based on the current locale:

    # ~q"/users" generates:
    case Localize.get_locale().cldr_locale_id do
      :de -> ~p"/benutzer"
      :en -> ~p"/users"
      :fr -> ~p"/utilisateurs"
    end

### Locale Interpolation

* `:locale` is replaced with the CLDR locale name.

* `:language` is replaced with the CLDR language code.

* `:territory` is replaced with the CLDR territory code.

# `sigil_q`
*macro* 

Implements the `~q` sigil for localized verified routes.

Generates a `case` expression that dispatches to the translated `~p` route for the current locale. The route path is verified at compile time against the router.

# `url`
*macro* 

Generates the router url with localized route verification.

# `url`
*macro* 

Generates the router url with localized route verification from the
connection, socket, or URI.

# `url`
*macro* 

Generates the router url with localized route verification from the
connection, socket, or URI and router.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
