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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Creating a translation for a new page


Go to End


4 Posts   1459 Views

Avatar
Futureal

Community Member, 9 Posts

27 May 2010 at 11:39pm

Edited: 27/05/2010 11:39pm

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

Community Member, 9 Posts

8 June 2010 at 3:17am

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

Community Member, 36 Posts

8 June 2010 at 5:03am

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

Community Member, 9 Posts

2 June 2011 at 9:35pm

@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