Vaibhav J.
Vaibhav J.

Reputation: 402

Multilingual ASP.NET MVC 4 - User Editable translations

I've setup an ASP.NET MVC Multilingual website. When user registers, they select their preferred language from a drop-down list and then on the website's labels, messages, alerts etc. are shown in their selected language. They can change their preferred language any time. (The registration page is in English - for now)

I've implemented this using the same technique as what is described here. I am doing a multilingual website for first time, so need help.

So I've got all translations in Resources file. For any translation which my client requests, I've to edit the Resources file, compile and deploy the website - for the changes to take effect.

I saw this link, but I cannot use this approach, since the translations should be updated as soon as my client changes them in the Admin panel. I cannot have a console application generating strong type translations as I am running on a shared hosting environment.

What I require:

My client should be able to change the translation text. For now, there are 4 languages that the website provides "English (default), German, Italic, French"

I plan to provide an Admin interface for my client to change the translation text for all languages. See the image for an idea as to how this interface will look like. enter image description here

I plan to save these translations in database (SQL Server). I am basically stuck on the method to retrieve and show these translations.

Here's what I could think of:

I cannot have separate Views for each language since the languages can be removed or added dynamically by the user.

I am pretty much clueless about how to do this, so any help that I can get would push me in the right direction.

Thank you.

Upvotes: 1

Views: 747

Answers (1)

Sohail Ahmad
Sohail Ahmad

Reputation: 86

You can do it by using "West Wind Globalization" here is an pretty clean example.

enter image description here

Visit : https://github.com/RickStrahl/Westwind.Globalization

Upvotes: 1

Related Questions