Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Bilingual Website - but where do I include the switch on the website??

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

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

Page: 1
Go to End
Author Topic: 1494 Views
  • mafalda
    Avatar
    Community Member
    1 Post

    Bilingual Website - but where do I include the switch on the website?? Link to this post

    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!

  • lekoala
    Avatar
    Community Member
    30 Posts

    Re: Bilingual Website - but where do I include the switch on the website?? Link to this post

    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 :

    http://www.silverstripe.com/site-builders-forum/flat/78360

    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.

    1494 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.