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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

mutilingual: official versus the hack

Go to End

6 Posts   1081 Views


Community Member, 203 Posts

16 December 2009 at 3:00am

Edited: 16/12/2009 3:02am

I would like to know the opinion, experiences, advice and pointers to hacks from the people in this forum regarding the two ways to create multilingual sites and their drawbacks:

The official way to create a multilingual site enables the use of multiple site trees/menu structures. However those site trees are not connected to one another. This means:

  • - For every page you want to translate, you have to tell the cms to create a translation (i.e. a new page in a new language) for you. This is not done automatically.
  • - If you change the location of a page in the site tree (change the menu structure) the location of that page in the translations is not changed accordingly, i.e. you have to change the position of all the pages in all your translations
  • - if you remove one page in one of the languages, the pages still exists in the other languages

In some instances this is the right thing to have, for example a firm with branches in several countries, and those branches have to operate independent of one another but still need a common look and certain pages need to correspond to one another. However, in this case I would probably try and find another solution for this, but YMMV.

Enter the unofficial way: Every language has an extra tab in the interface of a page. Managing the structure of a multilingual website is much easier in this case. My opinion: from a usability point of view this is much easier. However:

  • - How does this work out for things like search?
  • - How does this workout for things like numbers and dates and currency?
  • - Will this hack still be possible in the future?

What are your opinions on this, what are your experiences?


Community Member, 244 Posts

16 December 2009 at 8:13am

The unofficial way is defunct, there is no real reason to use it since the translatable system was refactored in 2.3.2 (as is stated very clearly on the wiki page).


Community Member, 203 Posts

16 December 2009 at 8:32am

I respectfully disagree, think there is a very real reason to use the unofficial way:

- If I have created a page called 'Spinach' and I move the page from the food section into the vegetable section, I expect the same page in the other languages to be in the same section after I am done.
- If I create a page called 'Piza' I expect that page to be there in other languages as well.

AFAIK this can not be done using the official way.

(This might work for 2 languages in a site that is not too big, but as soon as you are talking about 4 languages in a site that has 100 or more pages, this becomes problematic - this is not hypothetical, and it is not a food website either:-))


Community Member, 253 Posts

16 December 2009 at 11:29am

Having worked on a someone else's project that used the 'hacked' version, i can say it is the most horrible thing to try and use. It is a hack and it doesn't work properly.

It breaks some modules and searching is a nightmare! Stay away, it will just lead to SO much more hassle and limit what is possible.


Community Member, 203 Posts

16 December 2009 at 11:36am

Thanks for the answer. I must say I suspected something like that.

Anybody knows of a way to at least make the official way more like the unofficial - like for instance create a page in every language at the same time?


Community Member, 253 Posts

21 December 2009 at 2:06pm

I'm sure you can overload the onCreate (or similar) method that will create a page in all the sitetrees, same with unpublish, delete, etc. So that they would all be synced.

In fact, i am slightly surprised that isnt standard :P