In the latest project I was involved in we created a site that would be in Norwegian, during the development we did all texts in English and as the site would not be globalized we did no changes in in EPiServer, just a standard installation. When we then received the Norwegian translations we noticed that we had made the site for the English language branch and was not able to get the Norwegian translations to show up on the site.
With the help of this blog post, http://andrewgunn.blogspot.com/2008/01/change-page-language-in-episerver.html, we ware able to solve the problem.
The first thing we did was enable Norwegian in Admin mode.
Then we ran the following SQL script in the EPiServer database,
DECLARE @PageID INT
DECLARE @RowNum INT
DECLARE PageList CURSOR FOR
SELECT pkID FROM tblPage
OPEN PageList
FETCH NEXT FROM PageList INTO @PageID
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @OriginalLanguageBranchID INT
DECLARE @NewLanguageBranchID INT
DECLARE @NewLanguageID NVARCHAR(3)
SET @OriginalLanguageBranchID = Y
SET @NewLanguageBranchID = Z
SET @NewLanguageID = 'NO'
UPDATE tblPageLanguage
SET fkLanguageBranchID = @NewLanguageBranchID, fkLanguageID = @NewLanguageID
WHERE fkPageID = @PageID
UPDATE tblPage
SET fkMasterLanguageBranchID = @NewLanguageBranchID, fkLanguageID = @NewLanguageID
WHERE pkID = @PageID
UPDATE tblProperty
SET fkLanguageBranchID = @NewLanguageBranchID
WHERE fkPageID = @PageID and fkLanguageBranchID = @OriginalLanguageBranchID
EXEC editPageVersionList @PageID = @PageID, @SID = NULL
FETCH NEXT FROM PageList INTO @PageID
END
CLOSE PageList
DEALLOCATE PageList
The importent parts here are
SET @OriginalLanguageBranchID = Y
SET @NewLanguageBranchID = Z
SET @NewLanguageID = 'NO'
Here you set the id of the language you want to change from, the id of the language you want to change to and the new language id, in this case 'NO'.
Run this script in your EPiServer database to move all content from the old language to the new language.
All information you need can be found in the table tblLanguageBranch,
SELECT pkID, LanguageID FROM tblLanguageBranch
When this is done you will get a warning in EPiServer telling you that the page is not available in your current language, to into Admin mode and turn on Globalization, in the edit mode select the root page and language options for this page, change the default language to your new language, turn off Globalaization.
Finished! The site had now been transformed from a English site to a Norwegian one.