From 46e43f4bde4a35785b4997b81e86cd19f046b69b Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 21 Dec 2021 16:52:28 +0100 Subject: Commit --- src/node_modules/chance/docs/location/locale.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/node_modules/chance/docs/location/locale.md (limited to 'src/node_modules/chance/docs/location/locale.md') diff --git a/src/node_modules/chance/docs/location/locale.md b/src/node_modules/chance/docs/location/locale.md new file mode 100644 index 0000000..5d14db4 --- /dev/null +++ b/src/node_modules/chance/docs/location/locale.md @@ -0,0 +1,25 @@ +# locale + +```js +// usage +chance.locale() +chance.locale({region: true}) +``` + +Generate a random ISO-639-1 language code + +```js +chance.locale(); +=> 'ca' +``` + +Generate a random IETF region code + +```js +chance.locale({region: true}); +=> 'es-EA' +``` + + +_Note, the language codes comes from the [ISO-639-1 spec](http://www.loc.gov/standards/iso639-2/php/code_list.php) +and the region codes come from [IETF standard](http://data.okfn.org/data/core/language-codes#resource-language-codes-full)_ -- cgit