Skip to content

Commit b66d905

Browse files
committed
Update README.md
1 parent dbfe218 commit b66d905

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ await exportTranslations()
2626
await exportTranslations({
2727
outputDir: './my-translations',
2828
defaultNamespace: 'common',
29+
cleanOutputDir: false,
2930
})
3031
```
3132

@@ -50,10 +51,11 @@ await importTranslations({
5051

5152
### `ExportOptions`
5253

53-
| Option | Type | Default | Description |
54-
| ------------------ | -------- | ---------------- | ------------------------------------------------------ |
55-
| `outputDir` | `string` | `./locales-json` | Directory to write exported JSON files to |
56-
| `defaultNamespace` | `string` | `base` | Filename (without `.json`) for root-level translations |
54+
| Option | Type | Default | Description |
55+
| ------------------ | --------- | ---------------- | ------------------------------------------------------ |
56+
| `outputDir` | `string` | `./locales-json` | Directory to write exported JSON files to |
57+
| `cleanOutputDir` | `boolean` | `true` | Remove output directory before exporting |
58+
| `defaultNamespace` | `string` | `base` | Filename (without `.json`) for root-level translations |
5759

5860
### `ImportOptions`
5961

@@ -79,6 +81,8 @@ locales-json/
7981
└── ...
8082
```
8183

84+
Exported files are compatible with the [Single Language JSON](https://simplelocalize.io/docs/file-formats/single-language-json/) file format used by SimpleLocalize.
85+
8286
Each JSON file contains flat key-value pairs:
8387

8488
```json
@@ -101,7 +105,7 @@ Nested typesafe-i18n keys are flattened with dots:
101105

102106
After exporting translations, use the [SimpleLocalize CLI](https://simplelocalize.io/docs/cli/get-started/) to upload and download translations.
103107

104-
Example `simplelocalize.yml`:
108+
See [`example/simplelocalize.yml`](example/simplelocalize.yml) for a working configuration. Example `simplelocalize.yml`:
105109

106110
```yaml
107111
uploadLanguageKey: en

0 commit comments

Comments
 (0)