Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify that location.state refers to ISO 3166-2 #2574

Merged
merged 3 commits into from Dec 12, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/modules/location/index.ts
Expand Up @@ -372,6 +372,9 @@ export class LocationModule extends ModuleBase {

/**
* Returns a random localized state, or other equivalent first-level administrative entity for the locale's country such as a province or region.
* Generally, these are the ISO 3166-2 subdivisions for a country.
* If a locale doesn't correspond to one specific country, the method may return ISO 3166-2 subdivisions from one or more countries that uses that language. For example, the `ar` locale includes subdivisions from Arabic-speaking countries, such as Tunisia, Algeria, Syria, Lebanon, etc.
* For historical compatibility reasons, the default `en` locale only includes states in the United States (identical to `en_US`). However, you can use other English locales, such as `en_IN`, `en_GB`, and `en_AU`, if needed.
ST-DDT marked this conversation as resolved.
Show resolved Hide resolved
*
* @param options An options object.
* @param options.abbreviated If true this will return abbreviated first-level administrative entity names.
Expand Down