UKismetInternationalizationLibrary::SetCurrentLanguageAndLocale
#include "Kismet/KismetInternationalizationLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Sets both the current language and locale together from a single IETF language tag, without touching any asset group culture overrides.
Caveats & Gotchas
- • This is the recommended function for a standard language-select menu — unlike SetCurrentCulture, it leaves asset group overrides (e.g. per-language voice-over) intact.
- • Returns false if the requested culture has no matching localization data installed, leaving the previous language/locale active.
Signature
static ENGINE_API bool SetCurrentLanguageAndLocale(const FString& Culture, const bool SaveToConfig = false); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Culture | const FString& | The language and locale to set, as an IETF language tag (e.g. "zh-Hans-CN"). | — |
| SaveToConfig | const bool | If true, persists the setting to the user's GameUserSettings config. | false |
Return Type
bool Example
Language-select menu callback C++
void UMyOptionsWidget::OnLanguageSelected(const FString& CultureCode)
{
UKismetInternationalizationLibrary::SetCurrentLanguageAndLocale(CultureCode, true);
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?