I am currently in the process of localize a webapp. As I understood we're able to create custom localization files (either as a .js file or a .resx file) and use them to replace different labels from telerik components (e.g 'Drag a column header and drop it here to group by that column' for grid grouping). The localization also includes the formatting of dates and currencies (basically the '.kendo.culture' -js for dates and formatting and the '.kendo.messages' for labels).
My first question:
Is there a differene between creating a custom .js localization file or a custom .resx file(best practise, usability etc)? Most demos/example just using .js files for the localization and a few tutorials recommend to modifiy the .resx file, so I'm a bit confused.
Is there any way to use a localization file for 'hard strings' inside a html? Basically my ViewModel includes some properties which are displayed directly in a .cshtml file with a key before the property itself.
For example :
My goal is to create multiple localization files that includes the key e.g "Firstname" and display it based on the current culture.
Something like this
) : @Model.Firstname </div>
// Result :
// If culture 'German' = <div>Vorname : Joe </div>
// if culture 'France' = <div>Prénom : Joe </div>
// if culture 'Italien' = <div>Nome di battesimo : joe </div>
There are probably multiple ways to achieve my goal (e.g safe the keys in a json and read it based on the current culture etc) but im curious if theres anyway to use the telerik (custom) localization files because I need them anyway and I'll be able to use one way to localize my entire webapp. I've tried to find something like that in demos/examples but it seems like theres no example yet. Is it possible?
Third question :
This question is very similar to my second question but basically my ViewModel got a few Date properties which are displayed directly in my .cshtml file. Currently I'm displaying them like this:
The problem is the Dateformat won't change if the culture changes. The grid for example changes the dateformat if the culture changes and I want to achieve something similar directly inside a cshtml file. Again it seems like theres no demo/example/tutorial on how to achieve something like that. Is it possible?
Thanks in advance!