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: docs/concepts/i18n.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ function MultipleTranslations() {
75
75
76
76
The localization mechanism can be used for a custom component nested inside the [`Workspace`](/docs/components/workspace.md) by getting a [`Translation`](/docs/api/workspace/interfaces/Translation.md) instance which can be used to format localizable strings.
77
77
78
-
[`useTranslation()`](/docs/api/workspace/functions/useTranslation.md) hook can be used to acquire the `Translation` object; alternatively it is available as part of the [`WorkspaceContext`](/docs/concepts/workspace-context.md) via [`WorkspaceContext.translation`](/docs/api/workspace/interfaces/WorkspaceContext.md) property.
78
+
[`useTranslation()`](/docs/api/workspace/functions/useTranslation.md) hook can be used to acquire the `Translation` object.
79
79
80
80
In the following example, additional custom translation keys are added to the workspace to provide localizable component labels:
Copy file name to clipboardExpand all lines: docs/concepts/workspace-context.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,6 @@ The [`WorkspaceContext`](/docs/api/workspace/interfaces/WorkspaceContext) contai
16
16
|`view`|[`SharedCanvasState`](/docs/api/workspace/classes/SharedCanvasState.md)| Stores common state and settings for all [canvases](/docs/components/canvas.md) in the workspace. |
17
17
|`editor`|[`EditorController`](/docs/api/workspace/classes/EditorController.md)| Stores, modifies and validates changes from the visual graph authoring.<br/>See [graph authoring](/docs/concepts/graph-authoring). |
18
18
|`overlay`|[`OverlayController`](/docs/api/workspace/classes/OverlayController.md)| Controls UI overlays for the canvases, including dialogs and tasks. |
19
-
|`translation`|[`Translation`](/docs/api/workspace/interfaces/Translation.md)| Provides a translation for UI text strings.<br/>See [i18n](/docs/concepts/i18n). |
20
19
21
20
## Getting the workspace context
22
21
@@ -68,5 +67,5 @@ function Example() {
68
67
```
69
68
70
69
:::note
71
-
The library also uses separate context for [i18n](/docs/concepts/i18n) (which is accessible by[`useTranslation()`](/docs/api/workspace/functions/useTranslation.md) hook and `translation` property of the workspace context) and a nested context for the [`Canvas`](/docs/components/canvas.md).
70
+
The library also uses separate context for [i18n](/docs/concepts/i18n) (accessible with[`useTranslation()`](/docs/api/workspace/functions/useTranslation.md) hook) and a nested context for the [`Canvas`](/docs/components/canvas.md) (accessible with [`useCanvas()`](/docs/api/workspace/functions/useCanvas.md) hook).
0 commit comments