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
A pluggable widget can provide translations to be used within Studio Pro, to match a users preferred user interface language of Studio Pro. This includes translations for:
313
+
A pluggable widget can provide translations to be used within Studio Pro to match an end-user's preferred user interface language (of Studio Pro). This includes translations for:
314
314
315
-
* The name of the pluggable widget. For example, in the Toolbox.
316
-
* The names of properties or values of properties. For example, in the Properties dialog.
317
-
* Texts like labels used in the editor preview. For example, when editing a Page in Design Mode.
315
+
* The name of the pluggable widget (for example, in the **Toolbox**).
316
+
* The names of properties or values of properties, (for example, in the **Properties** dialog box).
317
+
* Texts like labels used in the editor preview (for example, when editing a page in Design Mode).
318
318
319
-
If provided, the Studio Pro user interface automatically uses the translations for the name of the widget and any of its properties. However, texts shown in the pluggable widgets preview have to be translated by calling the *translate* function. The *preview* function in *{widgetName}.editorPreview.js* receives this *translate* function as a prop. It'll look up the provided translation for a given key, like so:
319
+
If provided, the Studio Pro user interface automatically uses the translations for the name of the widget and any of its properties. However, texts shown in the pluggable widgets preview have to be translated by calling the **translate** function. The **preview** function in *{widgetName}.editorPreview.js* receives this **translate** function as a prop. It will look up the provided translation for a given key, as in the following example:
320
320
321
321
```tsx
322
322
exportfunction preview(props) {
@@ -328,11 +328,7 @@ export function preview(props) {
328
328
}
329
329
```
330
330
331
-
Translations for a pluggable widget can be provided in two ways: either in the widget package itself, or in a module.
332
-
333
-
These translations do not affect the behavior of the app once deployed.
334
-
335
-
If there's no translations available for a users preferred user interface language, English will be used as the fallback language.
331
+
Translations for a pluggable widget can be provided in two ways: in the widget package itself, or in a module. These translations do not affect the behavior of the app once deployed. If there is no translation available for a users preferred user interface language, English will be used as the fallback language.
336
332
337
333
### Providing Translations in a Pluggable Widget Package
0 commit comments