A few weeks ago I’d barely heard of MUI. Then I had to build a project that needed to be multilingual in every sense of the word, and I had to deep-dive fast.
Writing this on the train home — we just did our first demo to the client and it worked flawlessly (after my colleague set his profile to the correct language 😄).
Two Key Questions
1. Can you change field names displayed in lists and forms on the fly, based on the user’s language profile? 2. Can you even change the language of displayed values (e.g. dropdown items) based on the user’s profile?
Yes to both. The second requires significantly more effort.
The Foundation: Resource Files and LCIDs
The key to MUI is resource files and LCID — Language Code Identity. It’s an integer representing each language. For example: 1043 = Dutch, 1036 = French. Full LCID chart.
When Do You Need MUI?
- Single language site, never going multilingual → you don’t need MUI
- Installing language packs → start thinking about MUI
- Solution used by people who speak different languages → MUI is the answer
What Can Be MUI-fied?
Quite a lot: list names, field names, field values (needs custom forms), visual web parts. Standard SharePoint fields, and even content, can be translated using variations.
Step-by-Step: Your First MUI Feature
1. Create an empty SharePoint project (farm level)
2. Create a mapped folder to {SharePointRoot}\Resources:
name.resx— the language-neutral fallbackname.nl-NL.resx— Dutchname.fr-FR.resx— French- (repeat for each language)
In all resource files, add keys FeatureTitle and FeatureDescription with language-appropriate values.
3. Add a feature:
- Title:
$Resources:FeatureTitle; - Description:
$Resources:FeatureDescription; - In feature properties, set Default Resource File to
name
4. Deploy, then:
- If language packs are installed, Site Collection Settings → Language Settings will appear
- Check all installed languages
- Users get a language preference option in their My Settings / User Menu
- Navigate to your feature in Site Collection Features — its title changes with the selected language
Congratulations — you’ve done your first non-out-of-the-box MUI! 🎉
Next Steps
In my follow-up post I’ll go deeper and explain which LCID to retrieve in code to handle language changes correctly (hint: SPWeb.Language vs CultureInfo — they’re not always the same).
References: