Open gabipetrovay opened 11 years ago
@gabipetrovay Wasn't this fixed?
Nope. :disappointed: 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?