Telerik UI for Windows 8 HTML

This article explains how you can set up the automatic localization options for RadScheduler's strings and how you can override single messages to customize RadScheduler to your needs.

This topic contains the following sections.

Set Up Automatic Localization

Following is the set of steps that you can follow:

  1. At the root level of you application, create a strings folder. It will host the localization resources.

  2. Create a separate folder for each language that you want to support and name it after the corresponding locale, e.g. fr-FR.

  3. Go to C:\Program Files (x86)\Telerik\UI for Windows 8 HTML QX 201X\strings\en and copy the radgrid.resjson file. Paste it in each language's folder.

    The correct folder structure should look like this:


    In some scenarios (usually data operation features) RadScheduler displays other Telerik controls. If they are localizable, you need to copy their files and translate them as well. You can find a list of all localizable Telerik controls here: Localization

  4. Translate the provided messages to the corresponding language and save the file.

Now, the control will use the current culture of the application, which would be either the user default culture (if supported), the default culture provided in package.appxmanifest or the one that you have provided by overwriting the primary language of the application. For more information on the application's way of handling cultures, check the MSDN resource, linked at the end of this article.

Overriding Localization Strings

You can override any localization strings through RadScheduler's messages property. The overridden strings will take precedence over any culture or localization settings. The messages property exposes the same options that are in the .resjson files. In Code Listing 1 you can see these options along with their default values.

Code Listing 1: Localization Strings Copy imageCopy
    "save": "Save",
    "cancel": "Cancel",
    "destroy": "Delete",

    // Day view
    "yesterday": "Yesterday",
    "tomorrow": "Tomorrow",
    "allDay": "all day",
    "showFullDay": "Show full day",
    "showWorkDay": "Show business hours",

    // Week view
    "thisWeek": "This Week",
    "lastWeek": "Last Week",
    "nextWeek": "Next Week",
    "week": "Week ",

    // Agenda view
    "event": "Event",
    "date": "Date",
    "time": "Time",

    // Recurrence Messages
    "recurrenceMessages.deleteWindowOccurrence": "Delete current occurrence",
    "recurrenceMessages.deleteWindowSeries": "Delete the series",
    "recurrenceMessages.editWindowOccurrence": "Edit current occurrence",
    "recurrenceMessages.editWindowSeries": "Edit the series",

    // Editor Messages
    "editor.title": "Title",
    "editor.start": "Start",
    "editor.end": "End",
    "editor.allDayEvent": "All day event",
    "editor.description": "Description",
    "editor.repeat": "Repeat",

    // Editor Messages of Reccurance Items
    "recurrenceEditor.frequencies.never": "Never",
    "recurrenceEditor.frequencies.daily": "Daily",
    "recurrenceEditor.frequencies.weekly": "Weekly",
    "recurrenceEditor.frequencies.monthly": "Monthly",
    "recurrenceEditor.frequencies.yearly": "Yearly",
    "recurrenceEditor.end.endLabel": "End: ",
    "recurrenceEditor.end.endNever": "Never",
    "recurrenceEditor.end.endCountAfter": "After ",
    "recurrenceEditor.end.endCountOccurrence": " occurrence(s)",
    "recurrenceEditor.end.endUntilOn": "On ",
    "recurrenceEditor.offsetPositions.first": "first",
    "recurrenceEditor.offsetPositions.second": "second",
    "recurrenceEditor.offsetPositions.third": "third",
    "recurrenceEditor.offsetPositions.fourth": "fourth",
    "recurrenceEditor.offsetPositions.last": "last",
    "recurrenceEditor.daily.repeatEvery": "Repeat every :",
    "recurrenceEditor.daily.days": " day(s)",
    "recurrenceEditor.weekly.weeks": " week(s)",
    "recurrenceEditor.weekly.repeatEvery": "Repeat every: ",
    "recurrenceEditor.weekly.repeatOn": "Repeat on: ",
    "recurrenceEditor.monthly.repeatEvery": "Repeat every: ",
    "recurrenceEditor.monthly.repeatOn": "Repeat on: ",
    "recurrenceEditor.monthly.months": " month(s)",
    "": "Day ",
    "recurrenceEditor.yearly.repeatEvery": "Repeat every: ",
    "recurrenceEditor.yearly.repeatOn": "Repeat on: ",
    "recurrenceEditor.yearly.years": " year(s)",
    "recurrenceEditor.yearly.of": " of "

You can set a new string value to each of these options above. In Code Listing 2 you can see a simple example of using the messages property to overwrite the localization strings for the event editor.

Code Listing 2: Overriding Strings Copy imageCopy
var scheduler = new Telerik.UI.RadScheduler(document.querySelector("#schedulerWrapper"), {
    dataSource: data,
    date: new Date(2013, 5, 4),
    views: ["month"],
    messages: {
        editor: {
            title: "Event Title",
            start: "Start Date",
            end: "End Date",
            allDayEvent: "All day",
            description: "Additional Information",
            repeat: "Repetition"

See Also