How to read localized resource labels in MVC widget
Hi All,
I am working on sitefinity 9.1 and focused on MVC based development with multilingual support. I have created a simple mvc widget and i want to display localized labels in that.
I have found the below code piece that can be used in web-form widgets and master pages
<asp:Label runat="server" ID="lbl1" Text='<%$ Resources:NewsResources, Content %>'></asp:Label>
and seems working fine with in my multilingual site.How can i achieve the same in mvc widget?
Thanks
Ajai
Hi Ajai,
In view you can use it like that:
<
h1
>@Html.Resource("ResorceLabel", "ResorceName")</
h1
>
And you need @using Telerik.Sitefinity.Frontend.Mvc.Helpers for that