diff options
| author | Jess <[email protected]> | 2022-01-12 19:48:48 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-12 19:48:48 -0500 |
| commit | 71e902599651b645cdb6996c8cd562e8007a32ea (patch) | |
| tree | 368e83ffbeb836d5c66ad7af53c765c7444a26cb /docs/api/localization.md | |
| parent | a590f266e02d8f8a2cac65cb6e8bd395bf04074b (diff) | |
| download | faker-71e902599651b645cdb6996c8cd562e8007a32ea.tar.xz faker-71e902599651b645cdb6996c8cd562e8007a32ea.zip | |
feat: adding documentation with vitepress (#80)
Diffstat (limited to 'docs/api/localization.md')
| -rw-r--r-- | docs/api/localization.md | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/docs/api/localization.md b/docs/api/localization.md new file mode 100644 index 00000000..dbd03b43 --- /dev/null +++ b/docs/api/localization.md @@ -0,0 +1,67 @@ +# Localization + +As of version `v2.0.0` Faker has support for multiple localities. + +The default language locale is set to English. + +Setting a new locale is simple: + +```js +// sets locale to de +faker.setLocale('de'); +// or +faker.locale = 'de'; +``` + +- az +- cz +- de +- de_AT +- de_CH +- en +- en_AU +- en_BORK +- en_CA +- en_GB +- en_IE +- en_IND +- en_US +- en_ZA +- en_au_ocker +- es +- es_MX +- fa +- fr +- fr_CA +- ge +- id_ID +- it +- ja +- ko +- nb_NO +- nep +- nl +- pl +- pt_BR +- pt_PT +- ru +- sk +- sv +- tr +- uk +- vi +- zh_CN +- zh_TW + +## Individual Localization Packages + +As of version `v3.0.0` Faker supports incremental loading of locales. + +By default, requiring `faker` will include _all_ locale data. + +In a production environment, you may only want to include the locale data for a specific set of locales. + +```js +// loads only de locale +const faker = require('faker/locale/de'); +``` |
