View Full Version : HTML in Local Resource Files

03-25-2011, 06:17 PM

I have been tasked to re-architect a website to be capable of localization and culture specific content. As I go through and create my Local Resource files to accomodate the static content on my pages, I am noticing that some chunks of text contain HTML tags, and also character sets (™ for trademark symbol).

If I just directly copy this into the resource file, it interprets it as plain text when it is displayed on the page.

How can this be accomplished? Is there a better way to do it, rather than breaking the paragraph up into seperate resource records and wrapping those in HTML on the aspx page?


<asp:Literal ID="lit01" runat="Server" meta:resourcekey="lit01Resource">Polls that are available to be</asp:Literal>

<span style="color:#226699; font-weight:bold;">
<asp:Literal ID="lit02" runat="Server" meta:resourcekey="lit02Resource"> ranked</asp:Literal>

<asp:Literal ID="lit03" runat="Server" meta:resourcekey="lit03Resource">have a</asp:Literal>

<span style="color:#226699; font-weight:bold;">
<asp:Literal ID="lit04" runat="Server" meta:resourcekey="lit04Resource"> dark </asp:Literal>

<asp:Literal ID="lit05" runat="server" meta:resourcekey="lit05Resource">
background. Click poll numbers to select or to de-select them. The retired polls are tagged with R and yellow font </asp:Literal>

This above text needed to have some words a different colour and bolded. I included the styles, and left the text in there, hopefully to make easier to understand what I am trying to accomplish. Could this be done with only one resource key reference?