Skip to content

Commit 33bdda4

Browse files
committed
proofread
1 parent 8d89f99 commit 33bdda4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/pluggable-widgets

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/pluggable-widgets/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ Translations for a pluggable widget can be provided in two ways: in the widget p
332332

333333
### Providing Translations in a Pluggable Widget Package
334334

335-
To support a translation for a specific language and locale, create a *locales/{language-code}/{widget ID}.json* or *locales/{language-code}/translation.json* file. The language code can be any of the user interface languages supported by Studio Pro, such as *en-US*, *ja-JP*, *ko-KR* or *zh-CN*. Other files in the *locales* folder will be ignored. As a result, custom namespaces can't be used. It's advised to use *translation.json*, unless your mpk contains multiple pluggable widgets. Note that if you use the widget ID as the file name, you'll have to replace any spaces and illegal path characters (if there are any) with underscores. The file name should be all lower case. For example: if your widget ID is *%My Pluggable Widget%*, the name of the file should be *_my_pluggable_widget_.json*.
335+
To support a translation for a specific language and locale, create a *locales/{language-code}/{widget ID}.json* or *locales/{language-code}/translation.json* file. The language code can be any of the user interface languages supported by Studio Pro, such as *en-US*, *ja-JP*, *ko-KR*, or *zh-CN*. Other files in the **locales** folder will be ignored. As a result, custom namespaces cannot be used. We recommend using *translation.json*, unless your .MPK contains multiple pluggable widgets. Note that if you use the widget ID as the file name, you will have to replace any spaces and illegal path characters (if there are any) with underscores. The file name should be all lower case. For example, if your widget ID is *%My Pluggable Widget%*, the name of the file should be *_my_pluggable_widget_.json*.
336336

337-
These json files follow the format used by the I18next library, specifically v3. See [their documentation on the format](https://www.i18next.com/misc/json-format) for more information. For example to translate a widget with the name *Text Box* that has a property *length*, the contents of *locales/ko-KR/translation.json* might look something like this:
337+
These JSON files follow the format used by the i18next library, specifically v3. For more information, see [the i18nest JSON documentation](https://www.i18next.com/misc/json-format). For example, to translate a widget with the name *Text Box* that has a property *length*, the contents of *locales/ko-KR/translation.json* might look something like this example:
338338

339339
```json
340340
{
@@ -347,19 +347,19 @@ These json files follow the format used by the I18next library, specifically v3.
347347

348348
Translations for a pluggable widget can also be provided by a module. This can be useful when you would like to provide a module that has more than one pluggable widget, or if your pluggable widget uses one or more [/apidocs-mxsdk/apidocs/frontend/design-properties/](design properties).
349349

350-
To achieve this: create a *locales/{language-code}/{widget ID}.json* file in the Styling folder of your module. You'll have to replace any spaces and illegal path characters (if there are any) with underscores. The file name should be all lower case. For example: if your widget ID is *%My Pluggable Widget%*, the name of the file should be *_my_pluggable_widget_.json*. In addition, create a *locales/metadata.json* file. The resulting structure could look like this:
350+
To achieve this, create a *locales/{language-code}/{widget ID}.json* file in the **Styling** folder of your module. You will have to replace any spaces and illegal path characters (if there are any) with underscores. The file name should be all lower case. For example, if your widget ID is *%My Pluggable Widget%*, the name of the file should be *_my_pluggable_widget_.json*. In addition, create a *locales/metadata.json* file. The resulting structure will look something like this example:
351351

352352
{{< figure src="attachments/apidocs-mxsdk/apidocs/pluggable-widgets/translations.png" alt="A metadata.json file in the Styling/locales folder and a custom.widget.id.json file in the Styling/locales/ko-KR folder" class="no-border" >}}
353353

354-
The contents of *locales/metadata.json* should be:
354+
The contents of *locales/metadata.json* should be as follows:
355355

356356
```json
357357
{
358358
"widgetsToBeTranslated": []
359359
}
360360
```
361361

362-
The value of *widgetsToBeTranslated* is a string array where each string must be a valid widget ID. If a .json file for a pluggable widget exists, but its widget ID is not included in this array, it will be ignored.
362+
The value of *widgetsToBeTranslated* is a string array where each string must be a valid widget ID. If a .JSON file for a pluggable widget exists, but its widget ID is not included in this array, it will be ignored.
363363

364364
## Documents in this Section
365365

0 commit comments

Comments
 (0)