SOLVED

Programmatically Enable Multilingual on a Site

Copper Contributor

Hi

I want to programmatically enable Multilingual support on a site. It seems like when I set Web.IsMultilingual = true, it does not get reflected on the site!? Translations is still turned off. If I turn on  translations manually and then set Web.AddSupportedUILanguage(1053) via code, then Swedish translation is enabled. 

Any idea? 

2 Replies
best response confirmed by Daniel Gustafsson (Copper Contributor)
Solution

@Daniel Gustafsson 
Web.IsMultilingual is something else altogether, a relic of the days when some site templates supported MUI and others didn't.

 

To enable the new Multilingual Page Publishing feature on a site, you have to add feature 24611c05-ee19-45da-955f-6602264abaf8

@Martin Laplante 

I don´t know what happened to my reply I posted. Anyway. Thanks. that worked along with web.AddingSupportedUILanguage(LCID)

 

Office Dev PnP are using the web.IsMultilingual in their code so I thought that flag was still applicable. 

1 best response

Accepted Solutions
best response confirmed by Daniel Gustafsson (Copper Contributor)
Solution

@Daniel Gustafsson 
Web.IsMultilingual is something else altogether, a relic of the days when some site templates supported MUI and others didn't.

 

To enable the new Multilingual Page Publishing feature on a site, you have to add feature 24611c05-ee19-45da-955f-6602264abaf8

View solution in original post