-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handling relations #13
Comments
Not sure if I understand your goal correctly. So you already can enter the translations in ModelAdmin, but not the relations? Did you see this: #12 ? Wouldn't it be possible to be the other way round, so that you add the Vessels within the Group-Page? |
Thanks for linking issue 12, it's kinda the same. Let me try to explain the problem again: I like the idea of the $fields->add($this->getTranslatableTabSet()); - this allows the client to edit both the Danish and English language in the modeladmin - no need to jump into pages, changing language and so on. But i have a relation, each of my Vessels belongs to many groups: static $belongs_many_many = array( 'Groups' => 'VesselGroup' ); VesselGroup is a PageType. I'm getting the groups by doing this: I think the best solution would be to add an option to change the language in the modeladmin - as sugested in #12. Sorry for the bad explanations, but i hope you can follow me. |
Hi,
First of all, thanks for sharing this module :-)
I'm trying to get my ModelAdmin set up for the client to handle 2 languages.
I have a Vessel dataobject that i have extended with Vessel::add_extension('TranslatableDataObject');
I'm able to get my textfields added for translations.
On my dataobject Vessel i have:
static $belongs_many_many = array( 'Groups' => 'VesselGroup' );
The question is: How do i handle the relation? I need to add groups to each Vessel, and the groups are a Page in either English for the default language and danish for the secondary.
I can allready manage the groups if i set the language of the ModelAdmin manually by entering ?locale=da_DK in the URL.
Should i choose to use $fields->add($this->getTranslatableTabSet()); and if so, how do i manage the groups?
Or should i do it the same way as pages, where you change the language in the backend? For this option - how do i get some kind of button or dropdown in the ModelAdmin that allows the client to change the locale? (Asking them to type in the URL each time is not an option :-))
Hope you can help
The text was updated successfully, but these errors were encountered: