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: content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -746,25 +746,25 @@ When the **Small** option is selected, the `borderRadiusSmall` class will be app
746
746
747
747
Design properties can be translated to match the users preferred user interface language. This includes the name of the design property, its description and any of its options, if it has any, as shown in the styling properties panel. The provided translations do not affect the behavior of the design property.
748
748
749
-
To provide translations for your design properties, create a file *locales/{language-code}/translation.json* in the Styling folder of your module. The language code can be any of the user interface languages supported by Studio Pro, such as *de-DE*, *en-US*, *ja-JP*, *ko-KR* or *zh-CN*. Other files in the *locales/{language-code}* folders will be ignored. As a result, custom namespaces can't be used. The resulting structure could look like this:
749
+
To provide translations for your design properties, create a file *locales/{language-code}/translation.json* in the Styling folder of your module. 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/{language-code}* folders will be ignored. As a result, custom namespaces can't be used. The resulting structure could look like this:
750
750
751
751
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/translations.png" alt="Atranslation.json file in the Styling/locales/de-DE folder" class="no-border" >}}
752
752
753
-
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 design property with the name *Text align* with the options *left*, *center* and *right*, the contents of *locales/de-DE/translation.json* might look something like this:
753
+
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 design property with the name *Text align* with the options *left*, *center* and *right*, the contents of *locales/ko-KR/translation.json* might look something like this:
754
754
755
755
756
756
```json
757
757
{
758
-
"Textalgin": "Text ausrichten",
759
-
"left": "links",
760
-
"center": "zentrieren",
761
-
"right": "rechts"
758
+
"Textalign": "텍스트 정렬",
759
+
"left": "왼쪽",
760
+
"center": "센터",
761
+
"right": "오른쪽"
762
762
}
763
763
```
764
764
765
765
All design properties and options with the same name will be translated the same way, even if they are defined in different modules. When two or more modules define a translation for the same design property or design property option, the one used is not guaranteed to be the same as the one outlined in [Extending or Overriding Design Properties of Other Modules](#extend-existing-design-properties). As a result, it is recommended to only translate design properties and design property options in the same module in which they are defined.
766
766
767
-
If a translation is not available, the names and descriptions as defined in the *design-properties.json* are used as a fallback instead. For example, the user changes their settings to work with Studio Pro in German, but the module does not have a *locales/de-DE/translation.json* file. This can also happen if the name of a design property, any of its options or descriptions are missing from the corresponding *translation.json* file.
767
+
If a translation is not available, the names and descriptions as defined in the *design-properties.json* are used as a fallback instead. For example, the user changes their settings to work with Studio Pro in Korean, but the module does not have a *locales/ko-KR/translation.json* file. This can also happen if the name of a design property, any of its options or descriptions are missing from the corresponding *translation.json* file.
768
768
769
769
{{% alert color="warning" %}}
770
770
When adding translations for existing design properties, do not change the name of existing design properties or their options as defined in *design-properties.json*. Those names cannot be changed easily when there are apps already using them. See the [Renaming Design Properties](#old-names) section.
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/frontend/pluggable-widgets/_index.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,14 +336,14 @@ If there's no translations available for a users preferred user interface langua
336
336
337
337
### Providing Translations in a Pluggable Widget Package
338
338
339
-
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 *de-DE*, *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*.
339
+
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*.
340
340
341
-
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/de-DE/translation.json* might look something like this:
341
+
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:
342
342
343
343
```json
344
344
{
345
-
"Text Box": "Textfeld",
346
-
"length": "Länge"
345
+
"Text Box": "텍스트 상자",
346
+
"length": "텍스트 길이"
347
347
}
348
348
```
349
349
@@ -353,7 +353,7 @@ Translations for a pluggable widget can also be provided by a module. This can b
353
353
354
354
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:
355
355
356
-
{{< 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/de-DE folder" class="no-border" >}}
356
+
{{< 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" >}}
357
357
358
358
The contents of *locales/metadata.json* should be:
0 commit comments