InitializeCulture() on every single page necessary?

佐手、 提交于 2019-12-04 19:40:09

Yes. What you are doing complies with the Microsoft-recommended method. And since your example determines what language to use based on the URL, then each page request may require a different language, so you just couldn't avoid doing this for each individual page.

As per your second question, yes, all resource loading depends on CurrentCulture. So both local and global resources will be affected by your culture initialization.

Sarath

If the language in the application does not differ on a page to page basis then it make sense to reuse the code as answered here. Or better still use http module explained here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!