# How to Localize

The **LocalizationManager** class represents a singleton class that manages application string resources and supports two ways to change the localization in the current assembly:

* Using **StringLoader** - with highest priority
* Using resource map

> For a complete list of all localizable keys, see the  **Localization Keys** topic for each control.

## Localization Using StringLoader

The following example demonstrates how to create and use a StringLoader. Let's say you want to change the value of the key "Drag a column header here to group" on the RadDataGrid to "Telerik Group":

1. First you need to create a class that inherits from the IStringResourceLoader interface and implement the **GetString()** method that accepts the key you want to change and return the value you want to set.

> You will need to add the following namespace : **Telerik.Core**

#### **Example 1: Implement IStringResourceLoader**

```C#
	public class TelerikStringLoader : IStringResourceLoader
	{
		public string GetString(string key)
		{
			switch (key)
			{
				case "DragToGroup":
					return "Custom String Here";
				default:
					return null;
			}
		}
	}
```

1. Then set an instance of your implementation to the LocalizationManager:

#### **\[C#] Example 2: Set StringLoader Property**

```C#
	public App()
    {
		LocalizationManager.Instance.StringLoader = new TelerikStringLoader();
	}
```

Here you can see the changed result:

![WinUI Data Grid Example](https://www.telerik.com/winui/documentation/assets/744294f8c0361f137f6db0878304a114/datagridexample_v1.png)

## Localize using Resource Files

The following example demonstrates how to create a resource file and change the **DragToGroup** key of RadDataGrid control to "Telerik Drag to Group". Here are the required steps:

1. Create a new resource file:

   ![WinUI New Resourse File](https://www.telerik.com/winui/documentation/assets/06ce75ce06e69a0572020faa9acee3e1/newresoursefile.png)

![WinUI My Resources](https://www.telerik.com/winui/documentation/assets/c9fee8240c4fdb98e664add9e7295a48/myresources.png)

1. Open the file you just created and you will see a table with three columns: Name, Value and Comment.
   * "Name" is the field where you have to put the key you want to change.
   * "Value" is the field where you have to set the value you want.
   * The "Comment" field is for comments which are not required.
2. Set the value of the "DragToGroup" key to "Telerik Drag to Group" and save the file:

   ![WinUI Resource File](https://www.telerik.com/winui/documentation/assets/3673997e7c876a63ead1a61de6a19b56/resourcefile_2.png)
3. Finally, you have to assign your resource file to the resource map of the application in the code behind.

#### **\[C#] Example 3: Load Custom Resource File**

```C#
	public App()
    {
		this.InitializeComponent();
		LocalizationManager.Instance.UserResourceMap = LocalizationManager.Instance.ResourceManager.MainResourceMap.GetSubtree("MyResources");
	}
```

The result is:\
![WinUI Data Grid Localization](https://www.telerik.com/winui/documentation/assets/ffcc71cc66f722b094433197674a9968/datagridheaderlocalization.png)
