# SelectedLocaleChanged

> Raised after the selected locale changes.

## Definition

* **Type:** Event
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

```csharp
[AutoStaticsCleanup]
public static event Action<Locale> SelectedLocaleChanged
```

### Remarks

Subscribe to this static event to update UI or reload content when the user switches language. It is invoked after [LocalizationSettings.SelectedLocale](/engine/6000.7/script-reference/unity/localization/localizationsettings/selectedlocale.md) has changed, both during startup selection and on later changes; the new locale is passed to the handler. Because it is static, unsubscribe when your object is destroyed to avoid leaks. To run code once when initialization finishes instead, use [LocalizationSettings.InitializationCompleted](/engine/6000.7/script-reference/unity/localization/localizationsettings/initializationcompleted.md).

Additional Resources: [LocalizationSettings.SelectedLocale](/engine/6000.7/script-reference/unity/localization/localizationsettings/selectedlocale.md), [LocalizationSettings.InitializationCompleted](/engine/6000.7/script-reference/unity/localization/localizationsettings/initializationcompleted.md)

Refreshes a label whenever the locale changes.

### Examples

```csharp
using Unity.Localization;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class SelectedLocaleChangedExample : MonoBehaviour
    {
        void OnEnable() => LocalizationSettings.SelectedLocaleChanged += OnLocaleChanged;
        void OnDisable() => LocalizationSettings.SelectedLocaleChanged -= OnLocaleChanged;

        void OnLocaleChanged(Locale locale) => Debug.Log($"Locale is now {locale?.Code}");
    }
}
```
