private static void EnablingAlternateLanguages(SPSite site, SPWeb web)
{
SPWebTemplateCollection templates = site.GetWebTemplates(web.Language);
SPWebTemplate template = templates[web.WebTemplate];
if (template.SupportsMultilingualUI)
{
web.IsMultilingual = true;
SPLanguageCollection installed = SPRegionalSettings.GlobalInstalledLanguages;
IEnumerable supported = web.SupportedUICultures;
foreach (SPLanguage language in installed)
{
CultureInfo culture = new CultureInfo(language.LCID);
if (!supported.Contains(culture))
{
web.AddSupportedUICulture(culture);
}
}
}
}