I have Asp.net page which contains Labels. I want to implement Label as multilingual. I have 2 approaches(There may be more):

1: Use Text property as

<asp:Label id="some_id" Text="Resources.ResourceFile.ResourceKey" runat="server" />

And Second Approach is

2: Override Label control or create custom control and expose a key which will accept Resource key and Replace all the Label with this Custom control.

Please let me know, which is the best approach and why?

Thanks in Advance

有帮助吗?

解决方案

If I understood your question correctly, I think you should take a look at this:

http://www.codeproject.com/Articles/334820/Using-Globalization-and-Localization-in-ASP-NET

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top