Vulnerability in EPiServer.Forms
trying to programatically to update the Available languages for Catalog Content in a Sched.Job.
I have added a new Market and also the language in CMS (Admin -> Manage Website languages)
The Market is es-PA = Panama.
My codevar cloneCatalogCatalogLanguages = cloneCatalog.Property.Get("CatalogLanguages");(cloneCatalogCatalogLanguages .Value as ItemCollection<string>).Add("es-PA"); cloneCatalogCatalogLanguages .Property.Set("CatalogLanguages", dd );repository.Save(cloneCatalogCatalogLanguages , SaveAction.Publish);
When i go to the Catalog ( cms/Commerce/Catalog)
the Panama language is not checked and the page is not published???What am i doing wrong?
you are doing it wrong, what you can do should be like this
Assuming cloneCatalog is a writeable clone of your catalog content instance
Forgot to mention that you must have the new language enabled for your site. You can either use CMS => Admin => Manage Website Languages, or you can use ILanguageBranchRepository to do that programatically
Did it already, thank you.One last part, do not how i could activate the language in CMS, in code.Let's say i get the start page (or root page) and activate the language and then sett fallback
Any clue what I-Interfaces could do that?
If I get your correctly then you want to set the fallback setting? If yes then you can look into ContentLanguageSettingRepository. You can load ContentLanguageSettings of a content, add or change the Fallback setting, then save it back
You did understand me correctly.I have been searching for that repo for 2h.Tried everything but, always started with ILang...., Isetti...., IContentLang....But the Intelillisense did not give me any good hits.Thanks Quan.