Skip to content

Allow custom prefix per locale #3761

@caiotarifa

Description

@caiotarifa

Describe the feature

I’d like to configure my application so that a locale like pt-BR uses a human‑friendly prefix instead of the code in URLs.

E.g. /brazil/about instead of /pt-BR/about.

Ideally, something like this:

locales: [
  {
    code: 'pt-BR',
    file: 'pt-BR.yml',
    language: 'pt-BR',
    prefix: 'brazil'
  }
]

That way:

  • I don’t need to map every route manually via pages config or macros.
  • I can keep my existing locale code value (pt-BR) unchanged.
  • I can support a custom prefix string (brazil) that’s meaningful and SEO‑friendly.

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions