Last post Mar 21, 2006 12:17 PM by Durbs222
Mar 16, 2006 07:19 AM|Durbs222|LINK
I have an application that needs to be multi language and the way i'd have done it in asp was just to produce a few different files, lang_eng.asp,lang_ger.asp,lang_fr.asp etc containing every piece of text within the app as a variable and the use a select
case on every page like:
Select case session("app_lang")
I'm assuming there a more cunning way to do this in asp.net 2.0? Whats my best way of approaching it so every page is automatically given access to the correct language set according to a session var without having to resort to the old include method?
Mar 21, 2006 06:21 AM|ahmed_elnoby|LINK
in asp.net 2.0 you can do this so easly using localResourceFiles or globalResourceFiles and u just give yor control the key and the compiler gets the current culture and render the key from the correct resource files ,
by the way u don't need sessions or any thing to swap manually
u can do this in the global file in the Application_BeginRequest
and check the language querystring
according to it set your site culture like this
Mar 21, 2006 12:17 PM|Durbs222|LINK
Thank you Ahmed, useful info.
For anyone else looking to do the same thing i also found a very good 4 page article at: