Skip to content

Commit

Permalink
docs: clarify that location.state refers to ISO 3166-2 (#2574)
Browse files Browse the repository at this point in the history
  • Loading branch information
import-brain authored Dec 12, 2023
1 parent 1631115 commit 8013fa0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/location/index.ts
Original file line number Diff line number Diff line change
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.
*
* @param options An options object.
* @param options.abbreviated If true this will return abbreviated first-level administrative entity names.
Expand Down

0 comments on commit 8013fa0

Please sign in to comment.