Reputation: 1120
Our ASP.NET MVC application uses the KendoUI window control to display progress messages to the users. It works fine when used in languages with latin characters, but when setting the language of the web application to Russian, where the message should say something like
Составляем рапорт, пожалуйста подождите!
We get what is displayed in the image.
Is this an error or are we missing any configuration? I guess it could be something related to Unicode.
Thanks in advance.!
Upvotes: 2
Views: 720
Reputation: 21
Late, but here is one way to do it: use the Raw method from System.Web.Mvc.HtmlHelper. Here is code for using it as an extension:
using System.Web;
using System.Web.Mvc;
namespace Web.Utils
{
public static class HtmlHelperExtensions
{
public static IHtmlString Resource(this HtmlHelper helper, string value)
{
return helper.Raw(value.Replace("\"", "\\\""));
}
}
}
Also quotes are preceded with a slash, in order to be safely used in Telerik control template.
Then extension can be used in code like this:
@(Html.Kendo().Window().Title(Html.Resource(your_string))
Upvotes: 2