Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET: explicit vs implicit localization?

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 %>" />
like image 902
User Avatar asked Aug 21 '10 00:08

User


1 Answers

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..

like image 191
HoBa Avatar answered Sep 30 '22 16:09

HoBa