Setting Culture for ASP Page in Sharepoint RRS feed

  • Question

  • User-1095048110 posted

    I am trying to set culture to the sharepoint application pages using resource file. Culture is not applying in the sharepoint application pages. But the same thing is running in dot.net website application. Can any one guide me how to use resource file in sharepoint

     <asp:Label ID="LegendFirstname" runat="server"
                            Text="<%$ Resources:Multilingualpage, LegendFirstname %>" ></asp:Label>


    protected override void InitializeCulture()
                string culture = Request.Form["DropDownList1"];
                if (string.IsNullOrEmpty(culture)) culture = "Auto";
                //Use this
                this.UICulture = culture;
                this.Culture = culture;
                //OR This
                if (culture != "Auto")
                    System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(culture);
                    System.Threading.Thread.CurrentThread.CurrentCulture = ci;
                    System.Threading.Thread.CurrentThread.CurrentUICulture = ci;

    iam copying my resources files under

    c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources

    even after also not getting

    Please advice....





    Wednesday, October 13, 2010 2:11 AM

All replies

  • User-1618234021 posted


    If you are using SharePoint 2007, then this will not work. In SharePoint 2007, when we create a site, it is created in a language. We can select other languages if we have installed language packs on SharePoint 2007. But once a site is created in a language, say English, then you can not change the culture of any page running under that site. The language resources are fixed and can't be changed.

    The only thing we have is, to create another site in other language, say in French etc. Then we can change the normal resource binding for that language. But YOU CAN NOT achieve the same localization result as in normal ASP.NET application. Since there is no such restriction in ASP.NET application. That is the reason it is running fine in ASP.NET website and not running in SharePoint 2007.


    Wednesday, October 13, 2010 5:01 AM
  • User-1095048110 posted

    we have installed sharepoint language pack also. i am able to create bilingual sites. my only problem is the label value is not changing in the application page even if i select other culture in dropdown list. we need to create a site like http://sp.com.sa/English/Pages/default.aspx  

    Wednesday, October 13, 2010 9:40 AM