Skip to content

Feature Request: Add support for localization in country and state responses #215

@Adebesin-Cell

Description

@Adebesin-Cell

Hi 👋,

Thanks for this super useful API!

I'm currently using the /countries/positions and /countries/states endpoints to fetch country and state data.

Right now, the API returns all country and state names in English only, regardless of the user's language preferences.


✅ Feature Request

It would be really helpful if the API could support localization by allowing a language code or locale parameter (e.g., ?locale=fr or ?lang=es) to return names in the desired language.

Example Usage:

GET /countries/positions?locale=fr
[
  { "name": "Allemagne", "id": "DE" },
  { "name": "Espagne", "id": "ES" },
  ...
]

And for states:

POST /countries/states
{
  "country": "Germany",
  "locale": "fr"
}
[
  { "name": "Bavière", "id": "BY" },
  ...
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions