Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add i18n field support #9

Open
gabipetrovay opened this issue Sep 5, 2013 · 2 comments
Open

Add i18n field support #9

gabipetrovay opened this issue Sep 5, 2013 · 2 comments

Comments

@gabipetrovay
Copy link
Contributor

When a field is marked as:

myField: {
    ...

    i18n: true
    ...
}

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?

@ghost ghost assigned ottiker Sep 25, 2013
@ottiker ottiker removed their assignment Aug 26, 2014
@IonicaBizau
Copy link
Member

@gabipetrovay Wasn't this fixed?

@gabipetrovay
Copy link
Contributor Author

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}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants