3

Whats the best method to localize an existing ASP.Net Application (MVC 3).

What needs to be done: - How to determinate which language to serve for a user? Bases on IP or browser-locale? - How to store the texts most efficient (Resource file? Database?)

So far i have stored most of the texts in an resource file, but i'm unsure where to go from there.

tereško
  • 58,060
  • 25
  • 98
  • 150
daniel.herken
  • 1,095
  • 7
  • 19
  • Here is a link to a [Previous Answer](http://stackoverflow.com/questions/6265037/asp-net-mvc-3-localization) – Bivoauc Jun 22 '11 at 07:18

2 Answers2

4

You have a pretty good answer described in this article http://afana.me/post/aspnet-mvc-internationalization.aspx.

I think the best way to determine the language is based on the HTTP header AcceptLanguages. This will contain an array of the languages supported by the user's browser.

Regarding storing the texts, I would go for Resource files. However in some situations storing them into databases could be a better approach.

Stefan Filip
  • 1,791
  • 3
  • 15
  • 25
1

As addition to Stefy; Scott Hanselman posted an excellent blogpost about this.

Rhapsody
  • 6,017
  • 2
  • 31
  • 49