Localization
StoryFlow Editor can export authored translations with your project. The Unreal plugin reads them and gives your game one active language across all plugin components.
Importing Languages
Set up source and target languages in StoryFlow Editor, then export the project and import the full export folder in Unreal. The editor adds localization.json when target languages exist. Projects without that file continue to display their source text.
Call GetLanguages() on UStoryFlowSubsystem to populate a language menu. It returns the source language first, followed by the author's target languages. It returns an empty list if the imported project has no localization file.
Switching Language
Call SetLanguage with a code from GetLanguages. It returns false for an unknown code and keeps the current language. GetLanguage returns the active code. A successful switch affects subsequent dialogue, option, character and Data Asset string reads.
UStoryFlowSubsystem* StoryFlow = GetGameInstance()->GetSubsystem<UStoryFlowSubsystem>();
const bool bAccepted = StoryFlow->SetLanguage(TEXT("fr"));
if (bAccepted)
{
const FString ActiveCode = StoryFlow->GetLanguage();
// Update your language menu to show ActiveCode.
} Choose the language before starting dialogue when possible. Initial string values for script, global and character variables are resolved when their state is created. A language switch during a session reaches those initial values on the next applicable reset or dialogue start. Values your game writes at runtime remain the values it wrote.
Refreshing Your UI
Bind to the subsystem's OnLanguageChanged event to update your language menu and any UI strings you look up separately. The current dialogue state keeps the text it already resolved. Calling GetCurrentDialogue() again or redrawing its widget does not translate that cached line. New dialogue lines use the selected language, so choose it before starting dialogue when possible.
Saving the Player Choice
Plugin save slots contain story state, not the player's language preference. Store the selected code in your game's settings and call SetLanguage after loading the project, before showing dialogue. This also lets the preference apply when no story save exists.
For translation editing and CSV workflows, see the editor localization guide.