# Localization Provider

To localize RadCalendar to display control text and messages in a specific language:

* All required classes for localization are defined in **Telerik.WinControls.UI** namespace.

* Start by creating a descendant of the **CalendarLocalizationProvider** class.

* Override the **GetLocalizedString(string id)** method and provide a translation for the available strings. If a translation is not provided, the default value will be returned. This behavior is guaranteed by the call to the base **GetLocalizedString** method in the **default** clause of the **switch** statement in the example.

Below is a sample implementation of an English localization provider:

```C#
public class MyEnglishCalendarLocalizationProvider : CalendarLocalizationProvider
{
    public override string GetLocalizedString(string id)
    {
        switch (id)
        {
            case CalendarStringId.CalendarClearButton:
                return "Close";
            case CalendarStringId.CalendarTodayButton:
                return "Today";
            default:
                return base.GetLocalizedString(id);
        }
    }
}
```

```VB.NET
Public Class MyEnglishCalendarLocalizationProvider
    Inherits CalendarLocalizationProvider
    Public Overrides Function GetLocalizedString(id As String) As String
        Select Case id
            Case CalendarStringId.CalendarClearButton
                Return "Clear"
            Case CalendarStringId.CalendarTodayButton
                Return "Today"
            Case Else
                Return MyBase.GetLocalizedString(id)
        End Select
    End Function
End Class
```

To apply the custom localization provider, instantiate and assign it to the current localization provider:

```C#
CalendarLocalizationProvider.CurrentProvider = new MyEnglishCalendarLocalizationProvider();
```

```VB.NET
CalendarLocalizationProvider.CurrentProvider = New MyEnglishCalendarLocalizationProvider()
```

## See Also

* [Date Format Pattern](https://www.telerik.com/products/winforms/documentation/controls/calendar/localization/date-format-pattern)
* [Globalization Properties](https://www.telerik.com/products/winforms/documentation/controls/calendar/localization/globalization-properties)
* [Localization](https://www.telerik.com/products/winforms/documentation/controls/calendar/localization/localization)
* [CultureInfo and RegionInfo Basics](https://www.telerik.com/products/winforms/documentation/controls/calendar/localization/cultureinfo-and-regioninfo-basics)
* [Properties that can be localized](https://www.telerik.com/products/winforms/documentation/controls/calendar/localization/properties-that-can-be-localized)
* [Right-To-Left Support](https://www.telerik.com/products/winforms/documentation/controls/calendar/localization/right-to-left-support)
