Localization of WebForms without excessive use of meta: resourcekey

I was just given a project that needs to be localized.
I just came across meta: resourcekey and how it was used in combination with local resource files.

My question is: should I do it this way?
Consider this example immediately after MSDN:

<asp:Button ID="Button1" runat="server" Text="DefaultText" meta:resourcekey="Button1" /> 

If I read this for the first time (what I am), I would say: "Why point Button1 twice?"
If <@ Page @> already has Culture installed on auto and there are local resource files, go and find each controlling local resource, if any, without the need for this double mention for EVERY single control on the page. <sh> I looked at the page that we already have, and it looks like a mess if you ask me.

Did I miss something?
Or is this method out of date, and is there a better way to do this? All input (+/-) is evaluated. Thanks!

+4
source share
1 answer

I agree that specifying a control identifier a second time in the meta:resourcekey attribute seems redundant, but it is there for a good reason.

Suppose you support an application localized in, say, 42 languages. Suppose that translations for some of these languages ​​are transmitted, for example, to 6 different contractors.

Now imagine that you absolutely need to change the ID your button from Button1 to defaultButton . What would be the best way to do this?

  • Change the ID attribute, leave meta:resourcekey as it is, and be on your own fun path, or

  • Change the ID attribute, then change dozens of resource files to use the new ID , and then call all your contractors to change the resource files that they have provided to you?

+4
source