In this article we will be seeing how to enable support for alternate languages in SharePoint 2010. The installed languages in the SharePoint server can be supported by the site which is specified by the owner of the site, so that users who navigate to the site can then change the display language of the user interface to any of these alternate languages. For more information on Alternate Languages refer http://www.c-sharpcorner.com/UploadFile/anavijai/7304/ (Copy the link and paste). I have installed the Hindi language pack in my SharePoint 2010 server, in this I am going to enable support for Hindi language (Alternate language). Go to Site Actions => Site Settings => Site Administration => Language Settings. Check the Hindi language in the Alternate language's section. Click on Ok. Now the users have the ability to change the language of the User interface for a website to Hindi language as shown in the following. The same thing can be achieved using SharePoint 2010 object model. Steps Involved:
namespace EnableAlternateLanguage { class Program { static void Main(string[] args) { using (SPSite site = new SPSite("http://serverName:22222/sites/LanguageTest/")) { using (SPWeb web = site.RootWeb) { web.IsMultilingual = true; SPLanguageCollection installedLanguages = web.RegionalSettings.InstalledLanguages; IEnumerable<CultureInfo> supportedLanguages = web.SupportedUICultures; foreach (SPLanguage language in installedLanguages) { CultureInfo culture = new CultureInfo(language.LCID); if (!supportedLanguages.Contains(culture)) { web.AddSupportedUICulture(culture); } } web.Update(); Console.ReadLine(); } } } } } • Build the solution. • Hit F5. • All the alternate languages will be supported by the website.
Enable Alternate Languages using powershell:
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: