Skip to content

Handling relations #13

@thomasbnielsen

Description

@thomasbnielsen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions