tractorcow

I would probably recommend subsites if you want separate trees

tractorcow

You could also try using custom controller actions if you want to render a page with multiple parents (one parent in the CMS, but you can link them internally).

taoceanz

@tractorcow I tried translating the ParentID and it does the migration but breaks the site tree. Just reverted the changes, restored dB and it was all good.

The subsites is a good idea. Also custom controllers is an interesting.

Ultimately found the ss3 site had translated pages incorrectly changed to a different parent id.

Conan

Fluent module - Let's pretend we create one new page with the English locale and one page with Swedish locale, both are created as new pages and they do not relate to each other. Is it possible to link them afterwards so that they are translations for the same page/content? (from the CMS)

wmk

It is possible theoretically, but there is no UI I know of. You'd need to adjust the PageIDs in the <page>_localised tables

wmk

IMHO it's best to start with the "default" locale, but sometimes that's not possible. Having a task or feature to define another page as the translation of the current page is a good idea. Want to create an issue at gihub @Conan?

taoceanz

Hey, I'm trying to translate some widgets. Originally I'd wanted to translate the WidgetArea relationship, but when saving into a different locale, the MyWidget_Localised table contains the same WidgetArea ID for any locale on that page.

I've decided to translate the widgets directly which more or less looks like it should be working, but the translated fields aren't being populated. Any subclass of Widget gets _Localised tables (e.g. MyWidget_Localised) and when saving a widget into a new locale, a record is created in that MyWidget_Localised table with the locale relevant fields, however when loading the page, only data saved in the MyWidget table is displayed. In admin, it's as if in loading the widget, it's not looking to it's localised table. On the front-end though, widgets display only in the locales they've been saved in, but still show only data saved in the MyWidget table.

Any ideas on what I could do to make it read from the localised table? Am I maybe missing something to do with configs?

taoceanz

I'm defining CMS fields similar to the explicit generation defined in the docs: https://github.com/tractorcow-farm/silverstripe-fluent/blob/4.4/docs/en/dataobjects.md#explicit-field-generation

Show 1 attachment(s)
GitHub  
tractorcow-farm/silverstripe-fluent

Multi-language translate module for Silverstripe, without having to manage separate site trees. - tractorcow-farm/silverstripe-fluent

Hide attachment content