Files
Pipi Chen b8a3516cd6 update
2020-05-07 01:02:44 +08:00

484 B

locale

// usage
chance.locale()
chance.locale({region: true})

Generate a random ISO-639-1 language code

chance.locale();
=> 'ca'

Generate a random IETF region code

chance.locale({region: true});
=> 'es-EA'

Note, the language codes comes from the ISO-639-1 spec and the region codes come from IETF standard