Try our conversational search powered by Generative AI!

How to change a site's language programmatically


Hi epi champs,

I found the following reference with regards to changing a site's master language, which involves manually running a script against the database:

I'd like to know if there already is something available that can do this programmatically (i.e. a plugin that allows Site Admins to convert a language of a site, with some validations in place to tell them if there are multiple languages in the site being converted, etc)

One of our clients is going to be pumping their DXC with a lot of websites, of varying language/country (i.e. en-au, en-us, en-gb due to specific english terminologies + other non-english sites) and it would help them a lot if they can just copy an existing site with base content and modify from there instead of creating from scratch. We have considered enabling multi-language on the master site but the client does not want to be re-creating the blocks inside of a page when translated. If we make the content area not culture-specific to automatically bring the blocks over after translation, they lose the ability of deleting specific blocks on a page/site. Hence, the client want the copy/paste/modify language feature if possible :)

Appreciate any help!

May 29, 2018 2:00

weird requirement :) but playing with master language could break the whole versioning chain as memory. We tried this and we couldn't be able to use out of the box tools. What we've done was to add new feature to CMS admin area, so you can copy a content and descent and paste it to destination which means we maek a copy using master language of the new site for creation of new contents. Quite a bit a hard though, as copy takes time and dealing with blocks would make it quite complciated. Unfortunately the code was IP of customer and I can't share it :( but I can say possible.

May 30, 2018 1:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.