+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Database MVC/Razor localization

Database MVC/Razor localization

4 posts, 0 answered
  1. Jaan-Yuan
    Jaan-Yuan avatar
    2 posts
    Registered:
    02 Jul 2013
    04 Jul 2013
    Link to this post
    Hi,

    Is there a built-in feature for localization using razor with the translation text stored in a database?

    Thanks,
    Jaan
  2. Grisha 'Greg' Karanikolov
    Grisha 'Greg' Karanikolov avatar
    156 posts
    Registered:
    30 Nov 2016
    05 Jul 2013
    Link to this post
    Hi Jaan,

    I presume you are talking about the content that is inserted in Sitefinity - there is no built-in tool for automatic content localization. Each content type has API to interface with its content. Depending on your needs content can be obtained and saved in some format, then provided for translation. When the translation is ready, the API can be used for creating a localized version of that content item and the translated content can be inserted there.

    This is a 10 000 feet overview of how the process could look like. What would your use case be? That would be useful feedback as we are also researching different approaches for content exportation and automated translation.

    Looking forward to your reply!

    Regards,
    Grisha 'Greg' Karanikolov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Jaan-Yuan
    Jaan-Yuan avatar
    2 posts
    Registered:
    02 Jul 2013
    05 Jul 2013 in reply to Grisha 'Greg' Karanikolov
    Link to this post
    Hi,

    Thanks for the reply.

    We are looking at how we could localize the strings we would put in a widget, say a table of data with with predefined columns for example. Our team would really like to be able to build widgets frontend using razor/MVC while being able to provide a backend to end users to manage the labels.
  4. Grisha 'Greg' Karanikolov
    Grisha 'Greg' Karanikolov avatar
    156 posts
    Registered:
    30 Nov 2016
    08 Jul 2013
    Link to this post
    Hi Jaan,

    I see, that makes it clearer now :-)  You might want to check this forum thread. You can use localized strings for label texts in various places throughout Sitefinity, including MVC widgets. Strings originally look like this:
    <asp:Label runat="server" ID="lbl1" Text='<%$ Resources:NewsResources, Content %>'></asp:Label>
    There are various ways to call them inside an MVC view. Here are some useful articles that could get you there:
    ASP.NET MVC - Localization Helpers
    Resource Files and ASP.NET MVC Projects

    Regards,
    Grisha 'Greg' Karanikolov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered