Database MVC/Razor localization

Posted by Community Admin on 04-Aug-2018 22:58

Database MVC/Razor localization

All Replies

Posted by Community Admin on 04-Jul-2013 00:00

Hi,

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

Thanks,
Jaan

Posted by Community Admin on 05-Jul-2013 00:00

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

Posted by Community Admin on 05-Jul-2013 00:00

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.

Posted by Community Admin on 08-Jul-2013 00:00

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

This thread is closed