London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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!