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.

Customising the CMS /

Need help with multilingualcontent


Reply


2 Posts   964 Views

Avatar
neuron

Community Member, 6 Posts

17 April 2010 at 1:34am

Edited: 17/04/2010 1:37am

Dear all!

Sorry for posing such a simple question but I am still a newbie with SilverStripe. So here we go: I have an englisch website up and running with SilverStripe and I just love it. So far everything works perfect and the layout is incredibly easy to customise. Now I try to get my site to run multilingual content. I want to translate all my English pages to Finish and German. Therefore I tried to implement multilingual content as described in this documentation http://doc.silverstripe.org/doku.php?id=multilingualcontent

I can't get it work though :( Where exactly do I have to add the following code to?

Object::add_extension('SiteTree', 'Translatable');

I assume it has to be /mysite/_config.php or is it /cms/_config.php? What do sitetree and translateable stand for in the parenthesis? Will it let me translate "page"-type content?

Once this is done, where do I have to add the next bits of code like this one?

$translatedObj = Translatable::get_one_by_locale('MyObject', 'de_DE');

And what is the difference between the 4 types of code provided in the documentry?

Again, I am sorry to ask that many questions but I am not too familiar with php yet but eager to learn.
Best,
Torsten

PS: I forget to mention that I am using version 2.3.6 right now.

Avatar
neuron

Community Member, 6 Posts

10 May 2010 at 8:55pm

I finally figured out myself: I simply added Translatable::enable(); to the confing.php and now it works.