Web Forms :: Master Page And Resources / When Changing The Browser's Language And Refreshing Getting The Default Language?
Aug 30, 2010
Here is the thing. I have an aspx page with NO master page. I have two resource files with the same name (and specifying the language) in the App_LocalResources folder. If I do something like text="<%$ Resources:lblUser %> works fine. What I do to test it is change the browser's selected language.
But, if I do the same in a MasterPage or in a Page that is inside a MasterPage... when changing the Browser's language and refreshing... I'm still getting the default language...
I've been reading some threads about this but the situation was a little bit different.
I need to create my first (and simple) .net 4 web application that needs to be viewed in English, French and Italian. I've created and tested a sample web application that works fine with implicit and explicit localization set via web browser language preferences.
Now I'd like to add a simple Combo Box in the master page or in the login page to let the user choose the preferred language and would like the site to change its language based on this. I do not know how to start and to accomplish this task.
I have created a web application and generated local resources. Its working when user select language from browser. But what i want is, when user select language from dropdown list, i want to change the pages according to selected language. i can save user selected language in a session. then how should I change/assign local resource file to web page?
I have a calendar control and 2 flag buttons. One Finish and one Swedish. When i click the swedish i want the calnedar ( are gular one not the ajax toolkit extender) to show in swedish and the same for the finish button.
I've got a custom menu in the master page, that hides items according to different conditions (nothing to do with roles and perms). Is in the MasterPage.master file where i'm trying to hide them, e.g.:
The function isNormalMode() is defined in the code behind file MasterPage.master.cs, and everything is working properly in the page Default.aspx, but in the rest of the pages it doesn't execute the function at any time, so the item always remain visible.
Language problem cookies in the Arab language upload my project to server , I discovered that when you save data[Values] in cookies, we find ( Request.Cookies["test"].Values["val"] -----> تجربة) in that the symbols =?????
I'm following the instructions step by step in VS 2010, and it creates the resource files exactly how it's supposed to. However, when I run the program it just doesn't apply it. I don't see the different values from the resource file.
If I leave my resource file name as sample.aspx.resx, it works. But when I change it to sample.aspx.en-us.resx, it doesn't work. I'm supplying culture from the aspx page's Culter and UICulture properties. I'm being very careful in choosing the correct file name, as that could be the issue, but it just doesn't work. I also tried changing the culture in the backend code this way:
Protected Overrides Sub InitializeCulture() [code]....
Like the title says, when I try to get a control (HiddenField) using this.Parent.FindControl it returns an exception. Curiosly this only happens when I change the browser language to Italian, English but not Spanish (I'm from Argentina so everything in my computer is spanish).
I have this in the system.web section of web.config:
Elsewhere, I have this code:
There's nothing clever going on in the dataset - it's a simple SELECT. Everything works fine when my browser has the default settings. But, as soon as I change the browser language to cy-GB, the line of code above fails with:
I'm probably missing something obvious, but can't see why changing the language in the browser causes a [seemingly] unrelated data retrieval operation to fail.
I am using master pages and i want to benefit mywebsite with localization.
i created a baseclass below, then i used this class in my default.aspx and it worked fine. but how can i change the culture from site.master page then other pages should uinherit the culture. by doing the base class it is not exactly giving me what i want.
I have a requirement which i would like to achieve using .net.What i want is that any person who is having a mic attached should speak in some language.He can select some language from the application and the application would convert his voice into that particular language.i.e Voice-to-Voice conversion. How can i do this?Is there some third party API?How should i start?
I have used two language "English" and "Arabic" in my website. My requirement is that if a user visit the english page(eg. Contact Us) of my website and he clicks on "Arabic" language then the same page (Contac Us) of arabic should display. How i will do it?