Template and localisation help

2 posts, 0 answers
  1. Pierre
    Pierre avatar
    257 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>
    </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.

  2. Plamen
    Admin
    Plamen avatar
    2958 posts

    Posted 11 Dec 2018 Link to this post

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