aboutsummaryrefslogtreecommitdiff
path: root/docs/guide
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2023-04-25 22:05:52 +0700
committerGitHub <[email protected]>2023-04-25 17:05:52 +0200
commit698fd7d909740bb9a9b7e9dfe822ef8632e3d4c6 (patch)
tree015af666199b7ff20ac700586da7b8c47e707af5 /docs/guide
parent76c3080b758c3ced51d55e891396875a5004f5a8 (diff)
downloadfaker-698fd7d909740bb9a9b7e9dfe822ef8632e3d4c6.tar.xz
faker-698fd7d909740bb9a9b7e9dfe822ef8632e3d4c6.zip
feat(locale): add en_HK locale (#2083)
Diffstat (limited to 'docs/guide')
-rw-r--r--docs/guide/localization.md1
-rw-r--r--docs/guide/upgrading.md16
2 files changed, 5 insertions, 12 deletions
diff --git a/docs/guide/localization.md b/docs/guide/localization.md
index 407d411f..3c90df20 100644
--- a/docs/guide/localization.md
+++ b/docs/guide/localization.md
@@ -91,6 +91,7 @@ In this example there are 5 locales. Each of these is checked in order, and the
| `en_CA` | English (Canada) | `fakerEN_CA` |
| `en_GB` | English (Great Britain) | `fakerEN_GB` |
| `en_GH` | English (Ghana) | `fakerEN_GH` |
+| `en_HK` | English (Hong Kong) | `fakerEN_HK` |
| `en_IE` | English (Ireland) | `fakerEN_IE` |
| `en_IN` | English (India) | `fakerEN_IN` |
| `en_NG` | English (Nigeria) | `fakerEN_NG` |
diff --git a/docs/guide/upgrading.md b/docs/guide/upgrading.md
index 0572f5f1..a4bf7da1 100644
--- a/docs/guide/upgrading.md
+++ b/docs/guide/upgrading.md
@@ -123,20 +123,12 @@ fakerES.music.songName(); // 'I Want to Hold Your Hand' (fallback from en)
fakerES_noFallbacks.music.songName(); // throws a FakerError
```
-This also has an impact on data that aren't applicable to a locale, for example Chinese doesn't use prefixes in names.
+This also has an impact on data that aren't applicable to a locale, for example Hong Kong (`en_HK`) doesn't use ZIP codes/postcodes.
```ts
-import { faker, fakerZH_CN, zh_CN } from '@faker-js/faker';
-
-const fakerZH_CN_noFallbacks = new Faker({
- locale: [zh_CN],
-});
-
-faker.name.prefix(); // 'Mr'
-// Previously:
-//fakerZH_CN_noFallbacks.person.prefix(); // undefined
-// Now:
-fakerZH_CN.person.prefix(); // throws a FakerError
+import { fakerEN_US, fakerEN_HK } from '@faker-js/faker';
+fakerEN_US.location.zipCode(); // 90210
+fakerEN_HK.location.zipCode(); // throws a FakerError
```
### `faker.mersenne` and `faker.helpers.repeatString` removed