This is a migrated thread and some comments may be shown as answers.

Template and localisation help

1 Answer 60 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 2
Iron
Iron
Pierre asked on 07 Dec 2018, 08:48 PM

I read several post, but I can't find the way to correctly use french/english string in my template without crashing the templete with the # caracter.

see this part of a template:

<div class="Stats">
 <span class="LikeCount">#=Html.Kendo().TemplateEncode(@Resources.PortailGES.Aime)#<span id="LikeCount_#: Id #">#: LikeCount #</span></span>
  <span class="DislikeCount">@*@Resources.PortailGES.AimePas*@ <span id="DislikeCount_#: Id #">#: DislikeCount #</span></span>
</div>

 

I try with #=Html.Kendo().TemplateEncode(@Resources.PortailGES.Aime)# but that not work

 

The string Ressource.PortailGES.Aime contain "J'aime" in french rendered in the template like: J&#39;aime the crash the template.

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 11 Dec 2018, 01:16 PM
Hi,

The # symbols are expression delimiters. You should escape them with a \ prefix. Please refer to our documentation for more details. 

Regards,
Plamen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Templates
Asked by
Pierre
Top achievements
Rank 2
Iron
Iron
Answers by
Plamen
Telerik team
Share this question
or