The ContentEditorWebPart class decorated with the Multilingual attribute
The Content Editor Web Part is, thanks to its great flexibility, frequently used to enrich Web Pages. Unfortunately in scenarios where the Multilingual User Interface is involved you might wish you haven’t used it.

Content or is it even more?

The Content Editor Web Part (CEWP) is one of the standard Web Parts provided with SharePoint. Using the CEWP you can enrich your web pages with blocks of content.

In many scenarios the CEWP is being used not only to place content on pages, but also to enrich them with banners or even widgets. Many web services such as Twitter or Facebook provide turn-key widgets that can be easily embedded in SharePoint web pages using the CEWP and which turn those static pages into dynamic areas where the owners of the website can interact with the visitors.

The CEWP empowers power users to be more flexible and not to depend on the IT to extend their websites beyond what has been initially designed. This is even more important nowadays with markets becoming more dynamic and customers becoming more knowledgeable than even before.

More than a language

As a part of the SharePoint 2010 platform the Multilingual User Interface (MUI) has been introduced. The basic idea was to simplify working with SharePoint by providing its interface in the language preferred by the particular user.

With MUI SharePoint administrators would install additional Language Packs and Site Collection owners would then choose which of those languages should be available on their sites. Users could then choose in which language they would prefer to use SharePoint.

MUI has been introduced in SharePoint 2010 and the same basic idea of translating the UI on demand is available as a part of SharePoint 2013.

01

As its name says, the Multilingual User Interface is responsible for translating the User Interface.

MUI is for translating the UI only. SharePoint provides the Variations capability to build multilingual solutions where the content is translated to multiple languages.

With MUI only the UI is translated and the content remains the same. But does it indeed?

Inconvenient CEWP with MUI in SharePoint 2013

In MUI scenarios if you add a Content Editor Web Part and edit its content everything will seem to be just as expected.

02

The problems start however whenever one of the users decides to edit the contents of the CEWP when using one of the alternative languages configured in MUI.

Contents of the CEWP edited when using an alternative language defined in the MUI

Although nothing will seem suspicious during the editing or even publishing process for that matter, when you switch back to the original language, you will see old content!

Old content displayed in the CEWP when switched back to the original language of the website

The reason things are the way they are

The behavior you have just seen is not by accident. The Content Editor Web Part is MUI-aware and allows you to edit its contents separately for multiple languages.

From the technical perspective this is achieved by the Content property being decorated with the Multilingual attribute. During the process of serialization of the Web Part from the database, for every personalized property SharePoint checks if it’s multilingual, and if so, it loads its contents for that particular language. The Content Editor Web Part seems to be the only Web Part using this capability.

The inconvenience

Although the MUI-aware Content property of the CEWP might be useful and desired in some scenarios, it’s rather inconvenient the way it is implemented at this moment.

First of all the MUI-awareness is always there whether you want it or not. The Multilingual attribute is a part of the code of the CEWP and there is no way for you to control if you want to store the contents of the CEWP in multiple languages or not.

Another thing that makes the current implementation inconvenient is the fact that the SharePoint UI contains no hint whatsoever telling you if the particular Content Editor Web Part has its content defined in multiple languages or not. As long as you keep editing the CEWP’s content in the default language, the same content will be visible in all MUI languages. If however, the content will be customized in one of the alternative languages defined in the MUI, that particular language will have to have its contents managed separately from that point on. The only way for you to see if the right content is displayed across all the MUI languages is unfortunately to change the preferred language in your browser and refresh the page.

Summary

When multiple languages are used in SharePoint using the MUI capability, the Content Editor Web Part is aware of the active language and stores and displays its content for that particular language. Unfortunately, as this isn’t obvious from the SharePoint UI, it might lead to confusing site owners and increasing the complexity of the content management process. With that you should pay extra attention to managing the contents of Content Editor Web Parts in scenarios involving MUI.