IceFire Studios

IceFire Blog

Tips on using SharePoint in a multilingual environment

Little-Known Setting to Vastly Improve Translation Quality

SharePoint has a machine translation service that can be used to translate certain documents and phrases.  Out of the box, it can be used by Variations to translate pages, and by the Managed Metadata Service to translate terms in the term stores.  Beyond that, it is available through the API, and PointFire products make use of it.

For the past several months, Microsoft has been introducing a far superior machine translation engine.  So far it is available in English, French, Arabic, Chinese simplified (Mandarin),  German, Italian, Japanese, Korean, Portuguese, Russian, and Spanish.

It is not automatically used unless you specifically configure the machine translation service for it.  Simply open a session in the SharePoint Management Shell and issue this commandlet:

Set-SPTranslationServiceApplication "Machine Translation Service" -MachineTranslationCategory generalnn

That's it!  In this case the service was named "Machine Translation Service". For examples of the old vs the new engine, see http://translate.ai 

SharePoint Online uses the old engine, and there is nothing you can do about it. I don't think you can configure the machine translation service for your tenant.  Maybe you can request it nicely or vote it up.

The Secret Language Setting

In addition to the well-known language settings that were discussed in an earlier post, there is a little-known language setting with a different set of advantages and disadvantages.  We call it User Properties.  To get to it, add "_layouts/15/regionalsetng.aspx?Type=user" to a web site URL in SharePoint Online or on 2013 or 2016.  You will see this familiar but subtly different page:


It's quite similar to the User Profile pages, but with some differences, some good and some bad.

Advantages:

  • The effect of a language change here are immediate.  There is no message saying that the changes may take some time to take effect.
  • You do not need to have counter-intuitive settings for your user profile and your Office 365 user settings like we do for the instant toggle trick.

Disadvantages:

  • The setting is site collection specific.  On other site collections, your previous user profile settings still apply
  • The setting page is usually not reachable through the menus, and some parts of it do not work.
  • While changing your user profile will also change your user properties, the reverse is not true.
  • Some software will still follow your user profile settings rather than your user properties.
  • The setting is not synchronized with Active Directory.
  • Once the user profile and user properties are no longer in sync, it is difficult to get the user profile to work correctly again.

How does it work:

What sets the user profile is the User Setting Provider.  Every web application has a User Settings Provider.  By default it's the User Profile User Settings Provider, and that's always the one used on SharePoint Online.  When you change your user profile, it's using the User Profile User Settings Provider.  However if you set up your web application with no User Settings Provider, then the personal menu takes you to _layouts/15/regionalsetng.aspx screen rather than to the user profile screen.

After the User Profile Settings Provider has changed its language setting, a timer job will periodically copy the profile setting to the user properties of all site collections.  This timer job typically runs once every minute, hence the delay between changing your language setting in your profile and having that setting take effect.

When you change your Office 365 account language setting, that new setting propagates in two major steps.  First it copies itself to the User Profile's Display Language setting, then up to a minute later the user profile setting is copied to the user properties of all the sites.  This includes MySite, which is what controls the language settings of the OneDrive for Business accounts.

If you are using PointFire on premise, PointFire's language setting mechanism overrides all three SharePoint language settings, so none of this has any effect, but for PointFire 365, PointFire's language toggle sets the SharePoint Online language settings, it does not override them.

SharePoint Online Language Settings & the Instant Toggle Trick

This series of posts is based on my talk about Language & MUI in SharePoint 2016 & O365

Different components of the Office 365 suite have different ways of setting language.  Even within a single page, different parts of a page can be in different languages because they are government by different settings.  In this post we will talk mostly about how the user’s language is set for the purpose of MUI in SharePoint 2013 and 2016 and in SharePoint Online and other SharePoint-like components like OneDrive for Business.

Alternate languages

Every SharePoint site and Sharepoint-like site has one site language and zero or more alternate languages.  In a normal site, or in OneDrive go to the gear menu -> Site Settings -> Language settings (under Site Administration).  Sometimes it is not in the menu, so instead edit the URL to add “_layouts/15/muisetng.aspx”.  For Group sites, those created by the Group feature, you don’t need to do anything, the sites are created with every language already selected.

In on-premise, the list of potential Alternate languages is determined by the SharePoint language packs that you have installed on the server farm, but in Office 365, all language packs are already pre-installed.

Select the list of languages that you want to be available for MUI on this site.  In another post, we will see how to select the languages using PowerShell.

What sets the user’s MUI language

When alternate languages have been selected for a site, it is possible for different users to see many elements of the user interface in different languages.  The language choice applies to that user only.

There are three major settings that determine the user’s MUI language once the alternate languages have been selected: the browser settings, the User Profile display language settings, and the Office 365 Account language setting.

Browser language settings

Your browser language settings are the lowest-priority setting, and will work for most of SharePoint only when the other two settings do not have a valid value.  I won’t go into the details of how to set your browser’s language preference, but it’s a ranked list.  Your browser communicates to the SharePoint server what is its first, second, third choice, etc.  The first one that matches the site or alternate languages for the site is the one that gets selected.

Note that the list of languages that you can select in your browser doesn’t match the list of languages that SharePoint supports.  The browser lets you select a general language like English (en) or a more specific one like Australian English (en-AU), while SharePoint only supports American English (en-US).  Don’t worry about it, SharePoint does a pretty good job of matching that language to the language it supports.  For languages where SharePoint supports different versions, like Portuguese or Serbian, it will choose the version that you specify if both are available or the one that the site supports if the site only supports one.

Although it’s not the best way to select your language, there are several reasons why you might use the browser settings.  Certain other Office 365 components only support browser settings.  There is at least one component of SharePoint, having to do with the caching of Managed Metadata, that only works properly when the browser setting is set, and it can be used for the “Instant Toggle Trick” that we will see below.

User Profile language setting

In both SharePoint on premise and SharePoint Online, the user can have a user profile where their language preference is stored.  Navigating to a screen that lets you edit this settings may differ depending on how user profiles are managed in your case, but here is the most common location.

Click your name or picture at the top of a SharePoint screen, then select About me.  In SharePoint on premise it will bring you to you’re my site, in Office 365 it will bring you to Delve.  Click “About me” then click “Edit profile”

In SharePoint on premise, on the Edit Details page, you will see “Basic Information”, “Contact Information”, “Details”, “…”.  Click on the ellipsis (three dots) then click Language and Region.

In Office 365, getting to that page is different.  A little further down the Edit Profile page, you will see the text “How can I change the regional and language settings?”  Click on it and it will show the line “Click here, click the ellipsis (...), and then select Language and Region.”  Follow those instructions.  Under “Language” in the section “Language Preferences” you will see “My Display Languages”.  You can change the order of the languages that are there or pick a new language from the list and click on “Add”.  [Note: it can get a little trickier; this assumes that you are using the default UserSettingsProvider.  That’s for another day.]

For some reason, the list of languages that it offers includes a lot of languages that SharePoint doesn’t even support, like Lower Sorbian and Mohawk.  Pick one or more languages that you want, rank them in the order you want, then click “Save all and close”.  It will show you a message saying “Your changes have been saved, but they may take some time to take effect. Don't worry if you don't see them right away.”  It usually takes a few minutes for them to take effect, but sometimes it can be hours.  On some sites like Delve itself the effect is quick, but on others it can take several minutes or longer.


On SharePoint sites that have alternate languages, the first language in the User Profile's language list that matches one of the site languages is the one that gets selected and only when none of them match does it look at the browser settings.

Office 365 Account language setting

Office 365 has an account language setting distinct from the Profile language setting.  As opposed to the other settings it has a single value, it is not a ranked list.  To get to it, click the gear icon, then Office 365 settings.  It is at the bottom of the screen.


When you click on the language, you get yet another different list of languages to choose from, as well as other regional settings.


Two different things happen when you change that language.  First, there are direct effects on the components of Office 365 whose language is controlled by the Office 365 Account language setting.  These are mostly non-SharePoint components, but it includes the name of Office 365 components.  Second, there are indirect effects.  When you change your account settings it will automatically change the list of languages in your Profile to the one language that is in your new Account setting.  That in turn will eventually affect SharePoint and other Office 365 components.

You can go back to the Profile and see that the Lower Sorbian and Mohawk have been replaced with the language that you just chose.  This will eventually have an effect on all your SharePoint sites.  You can change the setting back to whatever you want, but some advice: wait for an hour or so.  If you change your language setting again too quickly, bad things can happen. Bad things like the setting won’t match what’s displayed and might not change at all until you change both settings again, respecting the proper long ritual pauses between changes.

The Instant Toggle Trick

The problem with changing your language setting using either the Profile or the Account setting is all the waiting involved.  If you’re a developer or content author and you need to change language regularly, how can you do it quickly?  The answer is the Instant Toggle Trick™.

1.       Use an Account language setting that has no overlap with your site’s base + alt languages

2.       Make your Profile language setting blank, or one that has no overlap with base + alt languages

3.       Go home, come back tomorrow

4.       Now change browser language settings.  The language change will be instantaneous

Obviously, you can’t train all users to do this and there are certain undesirable side effects.  For instance all your Office 365 settings pages will be in a language other than the ones that you normally use.  But it’s great for developers.


Localizing Navigation in SharePoint Online

Translating global navigation is not a feature of PointFire 1.1, the current version, but it will be a feature of PointFire 2.0 coming out soon.

In the meantime, the PointFire User Guide explains, in the section entitled "Translations of UI Elements", an alternate method for how to provide translations for global navigation and other UI elements.  Essentially you can export the strings in resx format, edit the file, then import the file again.  Version 2.0 will do this nearly automatically.

Unfortunately, it is not as simple as it sounds.  SharePoint will NOT include navigation nodes in the list of exported strings UNLESS someone has already attempted to translate them using the user interface.  SharePoint will include site names, list names, column names, and custom actions automatically, but NOT navigation nodes.  Even if the navigation item is the name of a list and you have translated the name of the list, the string in the navigation will remain in the original language.

In order to make the navigation node appear as an item in the exported translations, you must:

  1. Change your user interface language to a different language
  2. While in that language, click on "Edit links", or the equivalent in that language
  3. Click on the desired link
  4. Change the text.  The text must be different.  Repeat 3&4 for all the links
  5. Click on Save
  6. Go to Site Settings -> Export Translations again and follow instructions

This time the navigation node will be included.  Even if you have 5 languages, you only need to do this in one language other than the site language and SharePoint will export/import the string for all the languages.  Don't try to just add the navigation node to the .resx file, it won't work.
Office365™ - office.microsoft.com IceFire Studios is a Microsoft Silver ISV Partner SharePoint™ 2013 - Microsoft.com