PDA

View Full Version : [CLOSED] XTemplate + localized text



bossun
Apr 16, 2013, 10:05 PM
Hi,

I'm working on a multilingual website.

I would like to display localized label in a dataview component.

I tried to put a <asp:Literal> control but doesn't work.



<ext:Panel runat="server" Region="North" Height="300" AutoScroll="true">
<Items>
<ext:DataView runat="server" StoreID="MatchesStoreID" ItemSelector="div.MatchItem" >
<Tpl runat="server">
<Html>
<tpl for=".">
<div class="MatchItem">
<table>
<tr>
<td class="MatchTableFormat">A localized label</td>
<td>{INDEX}</td>
</tr>
<tr>
<td class="MatchTableFormat">Second localized label</td>
<td>{[TeamRenderer(values.HOMETEAMID)]}</td>
</tr>
<tr>
<td class="MatchTableFormat">third localized label</td>
<td>{[TeamRenderer(values.GUESTTEAMID)]}</td>
</tr>
<tr>
<td class="MatchTableFormat">Last localized label</td>
<td>{DATE:date("d M Y H:i")}</td>
</tr>
</table>
</div>
</tpl>
</Html>
</Tpl>
</ext:DataView>
</Items>
</ext:Panel>


thank you for your help

Baidaly
Apr 17, 2013, 2:46 AM
Hello!

I think, you should have localized versions of this XTemplate and set it to Html property on the server-side:


XTemplate1.Html = Resources.Labels.String1;