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:
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?
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?
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.
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.