X
X
Xab2011-04-28 18:02:42
ASP.NET
Xab, 2011-04-28 18:02:42

Localization in ASP .NET MVC 3?

You need to do localization on the site. I am familiar with MVC by the principle that I googled what is needed. It's about localization. Read a chapter in Sanderson's book, this and thatand many more similar things. As I understand it, the essence of localization comes down to the automatic selection of the required resource file (from approximately the following set of Res.resx, Res.ru.resx, Res.en.resx ...). I have a problem with automatic code generation for resources. My actions: create a resource file res.resx; change Access Modifier to Public, Custom tool to PublicResXFileCodeGenerator; I prescribe a couple of properties, look in res.Designer.cs - everything is there, all the properties have appeared, everything is fine. I do the same for Res.ru.resx - the code generator dies, apparently because of the dot in the file name, because it can't come up with a name for the class. What am I doing wrong?
PS I'm using Microsoft Visual Web Developer 2010 Express if that matters.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Gubsky, 2011-04-29
@Ernado

It is not necessary to use resource files. You can write your own text field manager, which will pull, for example, the necessary blocks of text from the database, depending on the current language.
By the way, it is not very convenient to store this kind of information in resources. If you need to fix the localization, you will have to re-publish the site. And if implemented through the database, then the localization can be edited from the admin panel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question