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
bind-crud should automatically save incoming values automatically with locales. For example, $set: { myField: "blah" } should be transformed into: $set: { "myField.de": "blah" } if the current locale is de.
The same when reading data. The current locale must change the find query. For example, { myField: "blah" } should be transformed into { "myField.de": "blah" }
Also the options must be scanned to adjust the i18n fields.
What happens if no locale? What is the default locale?
The text was updated successfully, but these errors were encountered:
Nope. 😞 It means crud to be aware of i18n fields and automatically save values in the correct locale if i18n is set for a field. Now we achieve this by explicitly adding the locale into the schema. Like here. But this approach creates some side effects (having to add the locale also in the label of the field and also having to either {custom hide the fields not in the users's locale} || {displaying all fields which generates clutter in the UI}).
When a field is marked as:
bind-crud should automatically save incoming values automatically with locales. For example,
$set: { myField: "blah" }
should be transformed into:$set: { "myField.de": "blah" }
if the current locale isde
.The same when reading data. The current locale must change the find query. For example,
{ myField: "blah" }
should be transformed into{ "myField.de": "blah" }
Also the options must be scanned to adjust the i18n fields.
What happens if no locale? What is the default locale?
The text was updated successfully, but these errors were encountered: