Template and localisation help

2 posts, 0 answers
  1. Pierre
    Pierre avatar
    260 posts
    Member since:
    Apr 2007

    Posted 07 Dec 2018 Link to this post

    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>


    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.

  2. Plamen
    Plamen avatar
    3025 posts

    Posted 11 Dec 2018 Link to this post


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

    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.
Back to Top