views:

25

answers:

1

Friends,

I'm working in asp.net mvc 2.0 and I'm stuck at the stage where I want to translate the site content (menu items, labels etc.) into predefined languages selected from the drop-down list. I want it to perform through asynchronous request (if possible). I have no prior experience in implementing globalization/localization in either web forms or asp.net mvc. So, few useful pointers (for beginners) are something what I require to accomplish this task at this stage.

Please help me out :(

Thanks in advance :-|

A: 

I don't understand why you would ever use Ajax to localize an entire page (menus, labels, error messages, etc...) making all the ajax requests to fully localize a page will take longer than reloading the page with the correct culture and having asp.net do the localization for you.

That being said there are many ways to localize in asp.net mvc. It is not as simple as Webforms but there are some good blog posts and even some code you can copy to help you out.

check this out for the specifics http://stackoverflow.com/questions/192465/how-to-localize-asp-net-mvc-application

Sruly
Thanks for your reply Sruly !I have a reason behind why I want localization behavior asynchronous. The pages I'm working on has most of the content already translated which comes from the database. This translated content is in different translations and is predefined into the database. I do not want this content to get overlapped with full page localization, but only labels etc.
Then I guess you will have to implement something on your own. I would recommend making an action that returns collections of strings for all the labels. (JsonResult) You can store the strings in .resx files or in the DB.
Sruly