Problem with string concatenation and resource value

I have strange behavior on my .aspx page. I am internationalizing some pages, but since I want to save only objects or a value object in my resource, I want to have a key value, for example:

(pt-br)
    CITY - Cidade
    STATE - Estado
    ...

But when I list the entities, I want to end the ":". How:

<asp:Label ID="LabelCity" runat="server" Text="<%$ Resources:Localizacao, CITY %>:"></asp:Label>

But if I put ":" after the resource property in the text, only ":" is displayed on the page.

My simple solution comes after defining the label, but I think this is also wrong:

<asp:Label ID="LabelCity" runat="server" Text="<%$ Resources:Localizacao, CITY %>"></asp:Label>:

Suggestions?

+3
source share
3 answers

: . , Concatenation ( ) i18n. , , , ( ) , ( - ).

: , L10n, , , "- ", " ", " - ". - , :

String title = Resources.getString("Firewall") + "<b>" + Resources.getString("Policy") + "</b>";

, , - , " Polityka zapory ogniowej", "" . "Zapora ogniowa Polityka", ( , "" ... , , , . , .

, .

, , ( ). ...

+1

<asp:Label ID="label" runat="server" Text="<%$ Resources: Resources, color %>" />:

:

<asp:Label ID="label" runat="server">
    <%= Resources.Resources.color + ":"%>
</asp:Label>
+4

(<%$) - , , . , , .

, , . ? ?

0

All Articles