File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,8 +37,38 @@ const MarkAsUnreadButton = () => {
3737| Prop | Required | Type | Default | Description |
3838| ---------- | -------- | ----------- | ------- | --------------------------------------------------------------- |
3939| ` i18nKey ` | Required | ` string ` | - | The translation key. |
40- | ` options ` | Optional | ` Object ` | - | The options used for pluralization and interpolation. |
4140| ` children ` | Optional | ` ReactNode ` | - | The default content to display if the translation is not found. |
41+ | ` options ` | Optional | ` Object ` | - | The options used for pluralization and interpolation. |
42+
43+ ## ` children `
44+
45+ ` <Translate> ` renders its child node if ` translate ` doesn't find a translation for the ` i18nKey ` .
46+
47+ ``` tsx
48+ const messages = {};
49+
50+ <Translate i18nKey = " ra.page.loading" >Loading</Translate >
51+ // Loading
52+ ```
53+
54+ ## ` i18nKey `
55+
56+ The translation key, used to look up the translation message.
57+
58+ ``` tsx
59+ const messages = {
60+ resources: {
61+ reviews: {
62+ action: {
63+ reject: ' Reject review' ,
64+ },
65+ },
66+ },
67+ };
68+
69+ <Translate i18nKey = " resources.reviews.action.reject" />
70+ // Reject review
71+ ```
4272
4373## ` options `
4474
@@ -77,33 +107,3 @@ const messages = {
77107```
78108
79109{% endraw %}
80-
81- ## ` children `
82-
83- ` <Translate> ` renders its child node if ` translate ` doesn't find a translation for the ` i18nKey ` .
84-
85- ``` tsx
86- const messages = {};
87-
88- <Translate i18nKey = " ra.page.loading" >Loading</Translate >
89- // Loading
90- ```
91-
92- ## ` i18nKey `
93-
94- The translation key, used to look up the translation message.
95-
96- ``` tsx
97- const messages = {
98- resources: {
99- reviews: {
100- action: {
101- reject: ' Reject review' ,
102- },
103- },
104- },
105- };
106-
107- <Translate i18nKey = " resources.reviews.action.reject" />
108- // Reject review
109- ```
You can’t perform that action at this time.
0 commit comments