c# - Selecting resource file in code behind at runtime -


suppose have 2 resources files; one's called homeen.resx , other 1 called homefr.resx. i've looked @ online tutorials show how selection of resource file done automatically, based on user's setting in browser.

i want select resource file @ runtime, this:

protected void page_load(object sender, eventargs e) {           switch (thelanguage) {         case 1:             // select english file homeen.resx;             break;         case 2:             // select french file homefr.resx;             break;     } } 

how write these statements?

thanks.

the correct resource files automatically read setting page's culture , uiculture properties. see msdn samples

you need rename files match expected pattern, home.en.resx , home.fr.resx respectively.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -