Best way to implement XML localization in Asp.net MVC?

We are developing an Asp.net MVC 3 application. One of the requirements of clients is that localization must be implemented using XML files. The client is going to update them from time to time.

The structure should be as follows:

<lang> <item key="moduleName">Admin</item> <item key="yes">Yes</item> <item key="no">No</item> </lang> 

What is the best way to implement this?
Could you point me to any good solution?

+4
source share
1 answer

Since the resx format used by ASP.net is also XML, I would consider using it without creating my own

  <data name="Anterior" xml:space="preserve"> <value>Previous</value> </data> <data name="Autos" xml:space="preserve"> <value>Cars</value> </data> <data name="AutosIncluidos" xml:space="preserve"> <value>Cars Included</value> </data> 

Benefits:

  • Already invented
  • Works without work in asp.net
  • Several tools for generating the format are available (for example, the excellent Zeta resource editor )
0
source

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


All Articles