8

I want to make a web app that support multiple languages(English, German, French ...) I also want to detect the browser language to use as default and also let the user select the language.

What will be the best approach for doing this?

  1. To have a separate view for each language. Keep the language in the user's session and render the correct view.
  2. To have the string translation in DB, and translate using a custom mechanism each time I render the view.
  3. Does MVC have some native support for this?
  4. Other option?

Thanks,

Radu

1 Answer 1

8

I would recommend you going through the following guide.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi Darin, is this still "the best" way for for MVC5 and emerging MVC6? Any thing interested been added for Globalization into the framework since MVC2?
@ppumkin Late answer but you can still apply this. Instead of using <%=Resource.Global.Title%> you would now use the Razor syntax, like this: @Resources.Global.Title

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.