Jump to:

5537 Posts in 1737 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Need help with multilingualcontent

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

Page: 1
Go to End
Author Topic: 900 Views
  • neuron
    Avatar
    Community Member
    6 Posts

    Need help with multilingualcontent Link to this post

    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.

  • neuron
    Avatar
    Community Member
    6 Posts

    Re: Need help with multilingualcontent Link to this post

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

    900 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.