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.

Archive /

Our old forums are still available as a read-only archive.

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

Multilanguage Website

Go to End

3 Posts   3040 Views


Community Member, 19 Posts

6 July 2007 at 1:30am

Hi there,

could someone give me an idea about realizing a multilanguage website with SilverStripe?! To be clear here: Frontend Content - not Admin.

I know that this point is in progress and development, but i need now a solution to this. Anyone?!




Community Member, 19 Posts

6 July 2007 at 5:31am

Nobody who builds a multilanguage site?!




Administrator, 690 Posts

8 July 2007 at 9:13pm

Your best bet is to add a custom fields in your Page class, such as GermanTitle and GermanContent

Then make 2 functions, Title() and Content(), on your Page class:

function Title() {
  if( /* current language is german */) {
    return $this->GermanTitle;
  } else {
    return $this->Title;

The final thing you've got to choose is how to switch between German and English. The simplest is probably a session variable, although this isn't very Google-friendly.

An alternative would be to set up a Director rule (call to Director::addRules) that mapped de/$URLSegment/$Action to a German version of ModelAsController.

I haven't spelled it out completely, but this should get you started. Good luck!