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:

Archive /

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

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

Bilingual Website - but where do I include the switch on the website??

Go to End

2 Posts   1797 Views


Community Member, 1 Post

29 May 2008 at 12:30pm

Edited: 29/05/2008 12:32pm

Hi all,
I am trying to install a website which works with two languages.
The translation in the admin area works fine. My basic language is German, the translation will be in English. I translated the home page for testing it.
Well, maybe I miss something... I published both pages. But how can I switch on the website from one language to the other? I'd like to let the user choose the language.

Thanks for any tipp! :)

Regarding to this another question: How will search engines handle this two language pages? Will every page have its own URL, like pagetitle-german/ and pagetitle-english/ or how will that work?

Thanks again!


Community Member, 31 Posts

29 May 2008 at 7:43pm

Well, it's really easy to switch languages... just append ?lang=en (for English) at the end of the url...

It could be a link in your template that looks like

<a href="$URLSegment?lang=en">English version</a>

If you want to deal with locales as well, I recommend you to read this post :

I'm not quite sure about the search engine thing... you can set a specific page name for each language, although I'm not sure it's necessary from a seo perspective. You can have page-xx as a page name, then your link to switch language will look like...

<a href="$URLSegment-en?lang=en">English version</a>

I haven't tried but I don't see why it wouldn't work.