RealDocs

UKismetSystemLibrary::GetDefaultLanguage

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

Description

Returns the platform's default language for localization, as an IETF language tag such as "zh-Hans-CN".

Caveats & Gotchas

  • Per the engine's own comment, this is typically the same as GetDefaultLocale, but some platforms distinguish the two (e.g. a system language different from the regional format locale) — don't assume they're always identical.
  • The tag can include optional script and country subtags; don't assume it's always a bare two-letter code like "en" — parse it as a full IETF tag if you need to match against a supported-culture list.

Signature

static ENGINE_API FString GetDefaultLanguage()

Return Type

FString

Example

Read the platform default language C++
FString Lang = UKismetSystemLibrary::GetDefaultLanguage();
UE_LOG(LogTemp, Log, TEXT("Default language: %s"), *Lang);

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.