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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -746,11 +746,11 @@ 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}/translate.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 *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:
750
750
751
-
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/translations.png" alt="Atranslate.json file in the Styling/locales/de-DE folder" class="no-border" >}}
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/translate.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/de-DE/translation.json* might look something like this:
754
754
755
755
756
756
```json
@@ -764,7 +764,7 @@ These json files follow the format used by the I18next library, specifically v3.
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/translate.json* file. This can also happen if the name of a design property, any of its options or descriptions are missing from the corresponding *translate.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 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.
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
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,9 +336,9 @@ 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}/translate.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 *translate.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 *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*.
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/translate.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/de-DE/translation.json* might look something like this:
0 commit comments