问题
To my mind the advantage of implicit localization over explicit localization is that if you have more than one property to localize for a given control, it's a more economical syntax.
In the case where you just need to localize some text I use the asp:Localize control which only has a single property (Text) that renders to the UI. Is there a reason to use one over the other? Any style preference? Are there any speed differences?
Implicit
<asp:Localize ID="Localize1" runat="server" meta:resourcekey="Something" />
vs
Explicit
<asp:Localize ID="Localize1" runat="server" Text="<%$ Resources:Something %>" />
回答1:
I'm more in favor over Explicit, sometimes you need to encode/decode what you have localized. Also, when dealing with multiple languages and culture, using Explicit saves you headaches..
回答2:
Well your question got me thinking if any of the two provides complie time error check. And found that it dose not provide compile time check. Both bombs at run time when given wrong values.
来源:https://stackoverflow.com/questions/3535797/asp-net-explicit-vs-implicit-localization