Jump to:

23479 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Duplicate entire website into new language!

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2
Go to End
Author Topic: 1797 Views
  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: Duplicate entire website into new language! Link to this post

    Fantastic!

    Just to confirm this duplicates the pages into the new locale, but not the content.

    how about adding the google diacritize? and then sites can be basically translated without any effort!

  • Zauberfisch
    Avatar
    Community Member
    30 Posts

    Re: Duplicate entire website into new language! Link to this post

    yes, of course, silverstripe does not translate the text

    the createTranslation method just duplicates the site (with the content in the already existing language) and saves it with a new id and a new url (eg: if it was /home/ and you do a createTranslation from de_DE to en_US it then will be /home-en-US/)

    (its the same as if you go to the translation tab in your cms, and press the button to create the site on another page.)

    also its good to use the createTranslation method, because it is the one that is from the multilanguage module, and will automatically creates a relation between the pages

    so for example, we have mysite.com ( = mysite.com/home )

    if I want to switch the language you can do that by adding ?locale=en_US

    mysite.com/ => will show you: mysite.com/home
    mysite.com/?locale=de_DE => will show you: mysite.com/home
    mysite.com/?locale=en_US => will show you: mysite.com/home-en-US (or what ever url your en-us homepage has)

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: Duplicate entire website into new language! Link to this post

    Yep, I was just clarifying for the folks reading the thread...

    I am extremely interested to duplicate the text, chrome of course does it for me automatically and those with google tool bars I guess it may do it too, but it would be create to have a site that didn't need JavaScript and would just create the it out of the box. Anyone got JavaScript translations working?

  • Zauberfisch
    Avatar
    Community Member
    30 Posts

    Re: Duplicate entire website into new language! Link to this post

    //fixed 2 typos in the code im my first post

    just looked it up, google translate seems to have a api, indeed, that would be cool to integrate something like that ;)

    1797 Views
Page: 1 2
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.