Try our conversational search powered by Generative AI!

Changing a site's language after it has been created

Vote:
 

Hello,

I have inherited a large EPI code base from my predecessors, a large amount of public sites are running on this code base in a variety of languages.

The site is structured as follows:

  • Root
    • MyBrand.fr
    • MyBrand.de
    • MyBrand.be
    • MyBrand.co.uk
    • MyBrand.nl

Unfortunately, all these sites have been created with their language set to English, although the contents is in many other languages. This is hindering preventing me from using @Html.Translate() as all sites would show the English translations.

As there is already a lot of content on these sites, I would rather not go for the nuke-and-pave option to rectify this.

Is there a way in which I can change the language of a whole site in one go, without having to retouch any piece of content?

#188398
Feb 22, 2018 9:34
Vote:
 

Hi,

I don't know if this will fully solve your problem but have you tried going to Episerver CMS -> Admin -> Config-tab -> Manage Websites and changing the culture there?

#188399
Feb 22, 2018 10:07
Vote:
 

I've tried that, but that gives me an error as there is no content available in the chosen culture. While I can make the new language available for the website (through the language settings), this doesn't work well as I'll then have to "translate" each bit of content from English to the new language. I've had a look at fallback languages and replacement languages, but this doesn't completely fit my needs either. In the generated code, I still see <html lang="en"> being rendered instead of <html lang="fr"> :(

Ideally, I'm looking for a way to say "Excuse me EPiServer, all blocks and pages under this node, of which I said that they are written in English, are actually written in French. Can you please update that?" without having to go through each bit of content.

#188412
Feb 22, 2018 14:25
Vote:
 

You could create a scheduled job (or initialization module, or migration step) that loops through all pages that you want to change. The job would create a new language version of each page, copy the content from the english version, and finally publish the page.
It will be some work to do, especially if there is a lot of different page types. But if your site has a lot of pages, I think that's the quickest option.

#188418
Feb 22, 2018 16:27
* 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.