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
Upload format is a format of the file(s) with translations. [See available upload formats](https://simplelocalize.io/docs/general/file-formats/)
90
-
91
-
**Additional parameters:**
92
-
- `--replace` allows you to **replace** existing translations with new ones,
93
-
- `--dryRun` allows you to **check** what translation files will be uploaded without actually uploading them,
94
-
- `--namespace` download translations for a specific namespace, e.g.: `--namespace home`,
95
-
- `--customerId` download translations for a specific customer, e.g.: `--customerId ikea`,
96
-
- `--uploadOptions` allows you to pass [additional options](https://simplelocalize.io/docs/general/options/) to the upload command, E.g.: `--options TRIM_LEADING_TRAILING_SPACES`. To pass multiple options, use comma as a separator.
97
-
98
-
> Since version 2.7 you can skip 'upload' part in the parameters names, e.g.: `--path` instead of `--uploadPath`.
99
-
100
-
Learn more about [upload translations command](https://simplelocalize.io/docs/cli/upload-translations/).
101
-
102
-
### Example: One file with multiple languages
103
-
104
-
```bash
105
-
.
106
-
└── locales
107
-
└── messages.json
108
-
```
109
-
110
-
Command:
111
-
```
112
-
simplelocalize upload
113
-
--apiKey <PROJECT_API_KEY>
114
-
--uploadPath ./locales/messages.json
115
-
--uploadFormat multi-language-json
116
-
```
117
-
118
-
### Example: One file per language
119
-
120
-
In this example we upload only source translations from `./en/messages.json` and uses `--uploadLanguageKey en-GB` to specify language key for the uploaded file for the Translation Editor.
121
-
It's a recommended way to upload source translations.
122
-
123
-
```bash
124
-
.
125
-
├── ca
126
-
│ └── messages.json
127
-
├── en
128
-
│ └── messages.json
129
-
└── es
130
-
└── messages.json
131
-
```
132
-
133
-
Command:
134
-
```
135
-
simplelocalize upload
136
-
--apiKey <PROJECT_API_KEY>
137
-
--uploadPath ./en/index.json
138
-
--uploadLanguageKey en-GB
139
-
--uploadFormat single-language-json
140
-
```
141
-
142
-
### Example: One file per language using placeholders
143
-
144
-
In this example we use `{lang}` placeholder to upload **many files** at once and specify language key for each file.
145
-
It's not a recommended way to upload source translations, as it uploads more files than necessary.
146
-
147
-
```bash
148
-
.
149
-
├── ca
150
-
│ └── index.json
151
-
├── en
152
-
│ └── index.json
153
-
└── es
154
-
└── index.json
155
-
```
156
-
157
-
Command:
158
-
```
159
-
simplelocalize upload
160
-
--apiKey <PROJECT_API_KEY>
161
-
--uploadPath /{lang}/index.json
162
-
--uploadFormat single-language-json
163
-
```
164
-
165
-
### Example: One file per language and namespace
166
-
167
-
In this example we use `{ns}` placeholder to upload **many files** at once for the English language. We used `--uploadLanguageKey en-GB` to specify language key for the uploaded file for the Translation Editor.
Download works similarly to the upload command, but this time it exports translation files from the Translation Editor to your local files.
195
94
196
95
```shell
197
96
simplelocalize download
198
-
--apiKey <PROJECT_API_KEY>
199
-
--downloadPath <DOWNLOAD_PATH_PATTERN>
200
-
--downloadFormat <DOWNLOAD_FORMAT>
97
+
--apiKey PROJECT_API_KEY
98
+
--downloadPath OUTPUT_FILE
99
+
--downloadFormat FILE_FORMAT
201
100
```
202
101
203
-
Download format is a format of the file(s) with translations. [See available upload formats](https://simplelocalize.io/docs/general/file-formats/)
204
-
205
-
### Example
206
-
207
-
Same as before you can use `{lang}` and `{ns}` placeholders to download many files at once and specify language keys that should be downloaded, eg.:
208
-
209
-
```shell
210
-
simplelocalize download
211
-
--apiKey <PROJECT_API_KEY>
212
-
--downloadPath ./src/{ns}/messages_{lang}.json
213
-
--downloadFormat single-language-json
214
-
--downloadLanguageKey en,de,fr
215
-
```
216
-
217
-
**Additional parameters:**
218
-
- `--downloadLanguageKey` allows you to download translation for specified languages. E.g.: `--languageKey en,de,fr`.
219
-
- `--downloadCustomerId` allows you to download translations for a specific customer. E.g.: `--customerId ikea`.
220
-
- `--downloadNamespace` allows you to download translations for a specific namespace. E.g.: `--namespace home`.
221
-
- `--downloadOptions` allows you to pass [additional options](https://simplelocalize.io/docs/general/options/) to the download command. E.g.: `--options WRITE_NESTED`.
222
-
- `--downloadSort` allows you to sort translations in the downloaded file. E.g.: `--sort NEWEST_KEYS_FIRST`. Available options: `NEWEST_KEYS_FIRST`, `NEWEST_KEYS_LAST`, `NAMESPACES`, `IMPORT_ORDER`.
223
-
224
-
> Since version 2.7 you can skip 'download' part in the parameters names, e.g.: `--path` instead of `--downloadPath`.
225
-
226
-
Learn more about [download translations command](https://simplelocalize.io/docs/cli/download-translations/).
- `--languageKeys` allows you to specify project language keys to auto-translate, e.g.: `--languageKeys en,de,fr`.
239
-
240
114
## Translation Hosting: Publish translations
241
115
242
116
It publishes translation to [Translation Hosting](https://simplelocalize.io/translation-hosting). It behaves exactly the same as publish buttons in the SimpleLocalize (Hosting tab).
@@ -315,46 +189,7 @@ simplelocalize upload
315
189
simplelocalize -c my-configuration.yml upload
316
190
```
317
191
318
-
## Sample configuration file
319
-
320
-
Filename: `simplelocalize.yml`
321
-
322
-
```yaml
323
-
# Get started with CLI: https://simplelocalize.io/docs/cli/get-started/
324
-
# Available formats: https://simplelocalize.io/docs/general/file-formats/
325
-
# Available import/export options: https://simplelocalize.io/docs/general/options/
0 commit comments