Skip to content

Commit 62b6950

Browse files
authored
Add example to stringsCrossReference docs (#260)
1 parent 2b0a060 commit 62b6950

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,18 @@ The value of each option can be a reference to another field or preset's name. F
618618

619619
##### `stringsCrossReference`
620620

621-
An optional property to reference to the strings of another field, indicated by using that field's name contained in brackets, like `{field}`. This is for example useful when there are multiple variants of fields for the same tag, which should all use the same strings.
621+
An optional property to reference to the strings of another field, indicated by using that field's name contained in brackets, like `{field}`. This is for example useful when there are multiple variants of fields for the same tag, which should all use the same strings. For example:
622+
623+
```json
624+
"stringsCrossReference": "{sport}",
625+
"options": [
626+
"ice_skating",
627+
"ice_hockey",
628+
"curling"
629+
]
630+
```
631+
632+
This would inherit all translations from the `gender` field but keep only the defined options.
622633

623634
##### `autoSuggestions`
624635

0 commit comments

Comments
 (0)