You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: localization/README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
# Localization
2
2
3
-
React PDF Kit supports multiple languages through JSON locale files. This folder contains translation files that customize all user-facing text in the PDF viewer.
3
+
React PDF Kit supports multiple languages through JSON locale files. This folder contains translation files that customize all user-facing text in the PDF viewer. For the full list of localization keys exposed by the `Localization` interface, see the [React PDF Kit interfaces documentation](https://docs.react-pdf-kit.dev/interfaces#localization).
4
4
5
5
## Available Locales
6
6
7
7
| File | Language |
8
8
| --- | --- |
9
9
|`en_US.json`| English (United States) |
10
+
|`de_DE.json`| German (Germany) |
10
11
|`it_IT.json`| Italian (Italy) |
11
12
|`pt_PT.json`| Portuguese (Portugal) |
12
13
|`th_TH.json`| Thai (Thailand) |
@@ -15,7 +16,7 @@ React PDF Kit supports multiple languages through JSON locale files. This folder
15
16
## Adding a New Locale
16
17
17
18
1. Copy `en_US.json` and rename it using the format `{language}_{COUNTRY}.json` (e.g., `ja_JP.json` for Japanese, `fr_FR.json` for French).
18
-
2. Translate all 77 values in the file. **Do not rename any keys** -- only change the values.
19
+
2. Translate all 79 values in the file. **Do not rename any keys** -- only change the values.
19
20
3. Pass your locale file to the `localization` prop on `RPConfig`:
20
21
21
22
```jsx
@@ -127,6 +128,8 @@ Each locale file is a flat JSON object. Below is a breakdown of every key groupe
127
128
|`singlePageTooltip`| Tooltip for single page view |
128
129
|`dualPageLabel`| Label for dual page view |
129
130
|`dualPageTooltip`| Tooltip for dual page view |
131
+
|`dualPageWithCoverLabel`| Label for dual page view with a cover page |
132
+
|`dualPageWithCoverTooltip`| Tooltip for dual page view with a cover page |
130
133
131
134
### Document Properties
132
135
@@ -169,7 +172,7 @@ Each locale file is a flat JSON object. Below is a breakdown of every key groupe
169
172
170
173
## Contributing a New Locale
171
174
172
-
Created a locale file for a language we don't support yet? We'd love to include it! Please open a pull request with your new `{language}_{COUNTRY}.json` file added to this folder. Make sure all 77 keys are translated and the file is valid JSON before submitting.
175
+
Created a locale file for a language we don't support yet? We'd love to include it! Please open a pull request with your new `{language}_{COUNTRY}.json` file added to this folder. Make sure all 79 keys are translated and the file is valid JSON before submitting.
0 commit comments