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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Duplicate entire website for a new language


Go to End


4 Posts   1182 Views

Avatar
BalazsB

Community Member, 3 Posts

18 April 2015 at 6:29am

I have a Silverstripe website set up in English. I would like to duplicate the same website, but using another language (Chinese).
I don't want to create Chinese translations for the English pages / data objects on the already existing website, I want a separate installation of the same website but using Chinese.

Is there a quick way to do this without loosing the English content on the Chinese website ? I would like to migrate the English content too to use as a guide for the translator - who will replace the English text with Chinese text (again, no separate translations will be created in Chinese on the new page).

I realize this can be done by duplicating the whole website and content, as a separate installation and then somehow change the locales of the pages - but I need this for everything: pages, and all the data objects.

What options do I have ?

Avatar
Guy Van Bael

Community Member, 61 Posts

18 April 2015 at 7:43pm

Edited: 18/04/2015 7:43pm

Export the database as an sql-file from phpmyadmin. Create a new hostingpackage and database. Import the sql file into the new database.
Copy over the files from the orginal website. Edit your configuration and htaccess (default language, databasepath) so the new site gets it's information from the right database.
About the chinese though... you maybe have to look into rtl-options.

Avatar
BalazsB

Community Member, 3 Posts

20 April 2015 at 6:51pm

Thanks Guy,

I know how to do that but I was asking for something like this:
- I create the new website (chinese version) and use the english content
- what should I do in the DB so that the system thinks that the english content is actually chinese ?

Avatar
Guy Van Bael

Community Member, 61 Posts

21 April 2015 at 12:51am

Hi Biagio. If you mean translating the content automatically... i haven't run into something like that yet.
I think you have to follow the procedure that i stated earlier and change the default language in mysite/_config.php
Something like this

// Set the site locale
i18n::set_locale('zh-CN'); //language code for simplied chinese

and then replace the existing english text in pages and dataobjects with their chinese equivalent.