Error in Localization Please Help Me

Jun 2 2009 6:20 AM
Hi All,

i am developing one web application with two language in English and Arabic in my application i used master page and other pages are content pages i used Link Button for Language selection in master page i create BasePage.cs in App_Code the BasePage.cs code is

 

1     protected override void InitializeCulture()
2        {
3           string currentCulture = Convert.ToString(Session["userCulture"]);
4            if (!string.IsNullOrEmpty(currentCulture))  
5                 currentCulture = currentCulture;  
6             else  
7                 currentCulture = "en-us";  
8             Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(currentCulture);  
9             Thread.CurrentThread.CurrentUICulture = new CultureInfo(currentCulture);  
10   
11           base.InitializeCulture();
12       }

 

i create Global.asax file also and the code for this is

 

 void Session_Start(object sender, EventArgs e)
    {
        
        Session["MyCulture"] = "en-us";

    }

in MasterPage.master i write the code for ButtonEvent for OnClick event and the code is

protected void changeCulture_Click(object sender, EventArgs e)
    {
        LinkButton senderLink = sender as LinkButton;  
   
        Session["userCulture"] = senderLink.CommandArgument;  
   
        Server.Transfer(Request.Path);  
    }

and i create the resource file for only one page that is orderonline page in Arabic and in English i put this file

in App_Resource folder and i make all pages derive from BasePage instead of Standard System.web.UI.Page

 now my question is when i run this application and i try to click the Arabic or English Button to change the

language instead of generating the onclick event from the linkbutton simply its submitting form in orderonline.aspx which have resource file in App_Resource folder

if i open some other page like about us etc from this page i can easily change the language

where i am doing mistake i don't can any one help me for solving this problem

 

thank in advance for any help