UKismetInternationalizationLibrary::SetCurrentCulture
#include "Kismet/KismetInternationalizationLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Sets both the current language and locale at once from an IETF language tag, and clears any asset group culture overrides. Returns false if the culture could not be set.
Caveats & Gotchas
- • This is the broadest of the culture-setting functions — it clears any per-asset-group culture overrides configured with SetCurrentAssetGroupCulture, which can undo an override you set earlier (e.g. dubbed audio).
- • SaveToConfig writes to the user's GameUserSettings config so the choice persists across restarts; omit it for a temporary preview.
- • Passing a culture with no installed localization data doesn't error — it silently falls back rather than throwing.
Signature
static ENGINE_API bool SetCurrentCulture(const FString& Culture, const bool SaveToConfig = false); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Culture | const FString& | The culture 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
Switch to French and persist the choice C++
const bool bOk = UKismetInternationalizationLibrary::SetCurrentCulture(TEXT("fr"), true); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?