I am developing an ASP.NET MVC application. In my application, I want to add an option with drop down that is for users to select language. I have found the localization articles using ASP.NET MVC.
http://www.c-sharpcorner.com/UploadFile/b8e86c/localization-of-a-site-in-mvc5-using-resource-file/
http://www.mikesdotnetting.com/article/183/globalization-and-localization-with-razor-web-pages
It all using resource file for localization and it retrieve the resource according Culture property. For example, We have to make two resource files if we are using English and France with the name of LangRes.resx and LangRes.fr-FR.resx . So I tested how to use resource files like below. But it is not working.
I created two resource files, named LangRes.resx and LangRes.fr-FR.resx
I set the modifier to public for both files.
Then I added the values to resource files
Then I added this in Web.config
<globalization enableClientBasedCulture="true" culture="auto" uiCulture="auto"></globalization>Then in the view file I printed the message liked this
@{ Culture = UICulture = "fr-FR"; } <h2>@LangRes.Title</h2>
Actually, it should show France. Right? Because I set the culture to "fr-FR" and it is mapped to the resource file with suffix LangRes.fr-FR.resx. But it is always showing "English". How can I fix it? Besides, what is the best way to localize in ASP.NET MVC?

