File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,30 @@ The resulting translation keys and messages that are used is
42
42
}
43
43
}
44
44
```
45
+
46
+ ### Form label translations
47
+
48
+ Forms provide translations that are used when displaying form elements. They are retrieved dynamically by calling
49
+ the ` translations/${locale} ` endpoint. From the json result of this call the data in the ` forms.fields ` key is merged into
50
+ the translations under the ` pydanticForms.backendTranslations ` key. These translations are referenced when rendering form input
51
+ elements.
52
+
53
+ The final translation dictionary will look like this
54
+
55
+ ```
56
+ {
57
+ metadata: {
58
+ product: {
59
+ name: 'A better name',
60
+ description: 'Description'
61
+ }
62
+ }
63
+ pydanticForms: {
64
+ ...
65
+ backendTranslations: {
66
+ ... `form.fields` result from `translations/${locale}` call
67
+
68
+ }
69
+ }
70
+ }
71
+ ```
You can’t perform that action at this time.
0 commit comments