Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

MultiLanguage on ContentProviders


Version 7.19.2

Hi! How do i do programatically so my content is multilangual (SV and EN) in the UI tree and on the site. Now i can-t change language when on a contentprovider page.

The .PageLanguage list is always count 0.

the problem? is that i can not DataFactory.Instance.CreateLanguageBranch(newPage.PageLink, new LanguageSelector("sv")); and after DataFactory.Instance.Save(newLanguagePage, SaveAction.Publish, AccessLevel.NoAccess); OR??

Ive set the capabilities to MultiLanguage

Apr 01, 2015 10:53
Apr 02, 2015 10:42

Found it!

 ILocalizable localizable = newPage as ILocalizable;
                var langs = new List<CultureInfo>();
                langs.Add(new CultureInfo("en"));
                langs.Add(new CultureInfo("sv"));
                localizable.ExistingLanguages = langs;
                localizable.Language = new CultureInfo(((LanguageSelector)languageSelector).LanguageBranch);

               newPage.LinkURL = this.ConstructContentUri(type.ID, newPage.ContentLink, newPage.ContentGuid).ToString();
Apr 09, 2015 15:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.