Last post Dec 05, 2011 11:01 PM by rstrahl
Nov 30, 2011 05:25 AM|surbhi garg|LINK
If i m putting this method on an ASP.net page it is working fine but my problem is i want to use this code on multiple pages
so i want to put this code at one place.
where i can put this code?????
Nov 30, 2011 07:34 AM|sam_xiii|LINK
define it in your web.config
<globalization culture="fr-FR" uiCulture="fr"/>
Or in the Global.asax or maybe in your master page if you want to make it dynamic
Dec 05, 2011 11:01 PM|rstrahl|LINK
Sam's suggestion of using web.config settings works great if you know explicitly which language to choose. You can also use Auto to automatically switch into the browser's locale, but that's rarely what you really want.
However if you dynamically want to switch language based on the browser preferences then you need to do this at the Application level. Put the code above into Application_BeginRequest.
There's more info on how to do this at the beginning of this article:
Hope this helps,
+++ Rick ---