Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi Mattias,
Assuming I understand your question correctly it should just be case of using:
IContentRepository.CreateLanguageBranch
To translate into Swedish and publish you'd want something like (untested):
var translatedContent = _contentRepository.CreateLanguageBranch<IContent>(contentLink, CultureInfo.GetCultureInfo("sv")); _contentRepository.Save(translatedContent, SaveAction.Publish | SaveAction.SkipValidation , AccessLevel.NoAccess);
Hope that helps,
/Jake
Hi!
I am currently creating a new page from code to use as my startpage for a sitedefinition which I also create from code..however.. even if I publish the newly created startpage I always end up with the following message in the CMS UI:
"This content is in English. It does not exist in svenska. Would you like to translate it now?"
How can I "Translate" the page from programatically and then publish it as well? I havent been able to find anything related to this here or while googling it..
Any ideas?
Thanks in advance!