# Localization

To change the default English localization provider you should use the **CurrentProvider** static property of the **SpreadsheetLocalizationProvider** class. For example, you can load the string from a XML file like this:

```C#
public void FileProvider()
{
    SpreadsheetLocalizationProvider.CurrentProvider = SpreadsheetLocalizationProvider.FromFile(@"C:\SpreadSheedStringsFile");
}
```

```VB.NET
    Public Sub FileProvider()
        SpreadsheetLocalizationProvider.CurrentProvider = SpreadsheetLocalizationProvider.FromFile("C:\SpreadSheedStringsFile")
    End Sub
```

> important You can download a XML file that contains all the currently used strings from here: [Strings file](https://github.com/telerik/winforms-sdk/blob/master/Localization%20Providers/SpreadsheetStrings.xml)

> note **SpreadsheetLocalizationProvider** contains all strings related to the **RadSpreadsheetRibbonBar** as well.

## AI Assistant Localization Strings

The following table lists all localization strings used by the AI Assistant feature:

| Localization String                     | Default Value                                                           |
| --------------------------------------- | ----------------------------------------------------------------------- |
| `Spreadsheet_AI_AuthorName`             | Spreadsheet AI                                                          |
| `Spreadsheet_AI_WelcomeMessage`         | Hello! I am your AI assistant. Ask me anything about this spreadsheet.  |
| `Spreadsheet_AI_ProviderNotConfigured`  | AI provider is not configured. Please set the AIToolsProvider property. |
| `Spreadsheet_AI_InputBoxWatermark`      | Ask me anything...                                                      |
| `Spreadsheet_AI_ThinkingWatermark`      | AI is thinking...                                                       |
| `Spreadsheet_AI_ErrorProcessingRequest` | An error occurred while processing your request.                        |

## Custom Localization Provider

Another approach is to create a custom localization provider class which inherits **SpreadsheetLocalizationProvider**. In it you should just override the **GetLocalizedString**  method and return the localized string depending on current id.

```C#
public class MySpreadsheetLocalizationProvider : SpreadsheetLocalizationProvider
{
    public override string GetLocalizedString(string id)
    {
        switch (id)
        {
            //----------------------
            case "Spreadsheet_Workbook":
                return "Spreadsheet Workbook";
           //----------------------
        }
        return base.GetLocalizedString(id);
    }
}
```

```VB.NET
Public Class MySpreadsheetLocalizationProvider
    Inherits SpreadsheetLocalizationProvider

    Public Overrides Function GetLocalizedString(ByVal id As String) As String
        Select Case id
                '----------------------
            Case "Spreadsheet_Workbook"
                Return "Spreadsheet Workbook"
                '----------------------
        End Select
        Return MyBase.GetLocalizedString(id)
    End Function
End Class
```

The following code snippet shows how you can use the new class:

```C#
public Localization()
{
    SpreadsheetLocalizationProvider.CurrentProvider = new MySpreadsheetLocalizationProvider();
    InitializeComponent();
}
```

```VB.NET
    Public Sub New()
        SpreadsheetLocalizationProvider.CurrentProvider = New MySpreadsheetLocalizationProvider()
        InitializeComponent()
    End Sub
```

> note It is necessary to set the SpreadsheetLocalizationProvider. **CurrentProvider** property before initializing the components.
