Internationalization Library for ASP.NET Applications

I am writing a web application in ASP.NET (2.0), VS2005. The main reason for developing a new application (instead of using ready-made ready-made solutions) is that I need full support for at least two languages ​​(this is the interface and data). I am looking for the best ways to solve i18n in ASP.NET (it can only be a user interface, sorting DB is easier). Obviously, .NET provides its own i18n mechanisms, and I used them before, but not very impressed - in my opinion, this is not the same as gettext that I used in several large open source projects in C ++ and Java . I am looking for a solution that satisfies the following requirements:

  • all translations collected in one place
  • adding new languages ​​will be easy.
  • the translation does not require VS and can be performed by rather inexperienced users (translators).
  • discovery of available languages
  • changes to source lines are easily cascaded into existing translations
  • support for multiple forms (ngettext)

(more ideas?)

+3
source share
5 answers

I'm not sure what you have against regular Globalization and Localization , which you already mentioned that you already used.

Localization .Net has proven itself in the projects that I used, without changing the basic principles. How exactly does it not suit you?

For example, the listed functions can be performed using the ASP.Net globalization infrastructure.

  • (.resx). .
  • , . .
  • Visual Studio . (.resx) - XML. , .
  • , "" .
  • Plurals, , , .

, , , , .

+6

: gettext, -, Win32. :

http://weblogs.manas.com.ar/spalladino/2009/10/07/gettext-i18n-strings-in-asp-net-controls/

, gettext #:

http://www.gnu.org/software/hello/manual/gettext/C_0023.html#C_0023

gettext i18n asp.net:

http://www.expatsoftware.com/articles/2010/03/fixing-internationalization-in-aspnet.html


: , .NET- . , :

My.Resources.ErrorMsgDbNotConnected

, . , , , - , . , : , . , .

gettext :

gettext("Sorry, the database connection could not be created.")

, . , , , .

gettext , , ( " 1 " ) .

, .NET hater:.NET , , , .

+4
+2

.Net , .

VS :

.net , Zeta Resource Editor . Zeta , , , , (, {0} {1}) .

- , .

, .

, " , ".

+1

https://github.com/jaska45/I18N

It uses rules from CLDR without using CLDR XML files or ICU DLLs. Eveything (logic and rules) are implemented as C # library files. Very easy to use.

var message = MultiPattern.Format("one;I have {0} car;other;I have {0} cars", cars);

When translator is localized, as many templates can be provided as the target language requires.

0
source

Source: https://habr.com/ru/post/1711518/


All Articles