Multilingual static content in ASP.NET

Is there an easy way to make static .aspx page content multilingual? Resource files are good for controls, but it’s quite difficult to annoy writing large pieces of html in them. Any easier ways?

+3
source share
3 answers

Create properties in resource files and use them, .NET will automatically find the correct resource file, also just make sure that the name of the property is the same in all resource files, so it will replace the property value on the .aspx page with the value in the resource file.

Do not encode the html markup in the resource file, do not use the html markup on the .aspx page itself, just get the basic values ​​from the resource files.

+2
source

I’ll just repeat what Mahesh said: do not put markup in resource files, just put static content in them.

If you need to use different views based on culture, consider doing something else. For example, if you use MVC, you can write a viewer that returns the correct markup for each culture.

0
source

@ciscoheat, , , LOCALIZE- - .

0

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


All Articles