0

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

Sandy
  • 6,285
  • 15
  • 65
  • 93

1 Answers1

1

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

vicch
  • 564
  • 3
  • 10
  • 25
  • Thanks for your response. That's good but my question is, i should use meta:resource or should i ovverride Label control? Which is better approach? – Sandy Sep 04 '13 at 08:28
  • 1
    Since there is already a built in capability of asp.net that allows you to do what you want I would say you should use it instead of implementing a custom label. – vicch Sep 04 '13 at 08:47