I don’t know solution for this problem but it is possible to bypass it.
It is impossible to achieve with blueprint only but C++ code is quite easy.
Short version: use FInternationalization::Get().SetCurrentCulture(TEXT("pl"));
Long version:
1.File → New C++ Class → Blueprint Function Library, name of class basically doesn’t matter from blueprint perspective.
2.In my case code looks like:
*.h
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "LocalizationChange.generated.h"
UCLASS()
class MYPROJECT2_API ULocalizationChange : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, meta = (FriendlyName = "Set culture to PL"), Category = "Localization")
static void SetCultureToPl();
UFUNCTION(BlueprintCallable, meta = (FriendlyName = "Set culture to En"), Category = "Localization")
static void SetCultureToEn();
};
*.cpp
#include "MyProject2.h"
#include "LocalizationChange.h"
void ULocalizationChange::SetCultureToPl()
{
FInternationalization::Get().SetCurrentCulture(TEXT("pl"));
}
void ULocalizationChange::SetCultureToEn()
{
FInternationalization::Get().SetCurrentCulture(TEXT("en"));
}
3.After compilation you’ll be able to simply call your functions from blueprint
Call it after level Event BeginPlay
and it should be fine. With bit of extending its possible to create language selection thanks to this.