RealDocs

UKismetSystemLibrary::GetDefaultLocale

function Engine Blueprint Since 4.0
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns the platform's default locale for internationalization (number/date formatting, currency, etc.), as an IETF language tag such as "zh-Hans-CN".

Caveats & Gotchas

  • Governs regional formatting conventions, not necessarily the UI display language — see GetDefaultLanguage for that, and note the two can differ on platforms that distinguish system language from regional format.
  • The tag can include optional script and country subtags; parse it as a full IETF tag rather than assuming a bare two-letter code.

Signature

static ENGINE_API FString GetDefaultLocale()

Return Type

FString

Example

Read the platform default locale C++
FString Locale = UKismetSystemLibrary::GetDefaultLocale();
UE_LOG(LogTemp, Log, TEXT("Default locale: %s"), *Locale);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.