Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions

Creating a translation for a new page


Reply

4 Posts   927 Views

Avatar
Futureal

27 May 2010 at 11:39pm (Last edited: 27 May 2010 11:39pm), Community Member, 9 Posts

Multilangual content is nice.
I am working on a 'sparse' site: much of the content is not translated, but a full sitetree has to be available in the alternative language.
If a page's Content is not available (empty page) in the alternative language, it automatically shows the page in the default language without leaving the SiteTree (we added this functionality)

However, if we create a new page in the default language, we also automatically want to create a page in the alternative language.
Is there some way to overwrite the constructor of a new Page so that it also automatically generates the translation?

Avatar
Futureal

8 June 2010 at 3:17am Community Member, 9 Posts

Anyone know this?

Simple question I think: is it possible, upon creation of a new Page, to also immediately create an empty translation?

Avatar
Ironcheese

8 June 2010 at 5:03am Community Member, 33 Posts

I'm sorry Futureal,

I can't help you but could you tell me/us how you managed your default Language Fallback function?

I need such a function aswell and just couldn't make it work. :S

Avatar
Futureal

2 June 2011 at 9:35pm Community Member, 9 Posts

@Ironcheese
I know this reply is late, but I think a suggestion of how to solve this is here:
http://silverstripe.org/general-questions/show/16412#post301533#post301533