Skip to content

Class UTryllTextProvider

ClassList > UTryllTextProvider

More...

  • #include <TryllTextProvider.h>

Inherits the following classes: UObject

Inherited by the following classes: UTryllStringTableTextProvider

Public Functions

Type Name
FString GetCurrentLocale () const
bool GetText (FName Table, const FString & Id, FString & OutText) const
virtual bool GetTextForPreview (FName Table, const FString & Id, const FString & Locale, FString & OutText) const
virtual void InvalidatePreviewCache ()
virtual TArray< FString > ListIds (FName Table) const
virtual TArray< FString > ListLocales () const
virtual bool OpenInEditor (FName Table, const FString & Id, FString & OutMessage) const
virtual bool SupportsEditorPreview () const

Public Static Functions

Type Name
void BroadcastLocaleChanged ()
FString CurrentProviderLocale ()
UTryllTextProvider * Get ()
bool LocaleForLanguageChange (bool bSessionLocaleExplicit, FString & OutLocale)
FSimpleMulticastDelegate & OnLocaleChanged ()
FString ResolveSessionLocale ()

Detailed Description

Game-owned lookup for Text IDs on a workflow. Tryll does not own a string table. The class is chosen in Project Settings → Tryll Client → Text Provider. None means prompts stay inline and the Tryll Locale field is the session language.

Public Functions Documentation

function GetCurrentLocale

FString UTryllTextProvider::GetCurrentLocale () const

BCP-47 tag of the game's current language. Empty = unset.


function GetText

bool UTryllTextProvider::GetText (
    FName Table,
    const FString & Id,
    FString & OutText
) const

Text for Id in Table, in the provider's current language, after the provider's own fallback. False when the ID is unknown.


function GetTextForPreview

inline virtual bool UTryllTextProvider::GetTextForPreview (
    FName Table,
    const FString & Id,
    const FString & Locale,
    FString & OutText
) const

Exact locale, no fallback. False when that locale has no entry.


function InvalidatePreviewCache

inline virtual void UTryllTextProvider::InvalidatePreviewCache () 

Drop cached preview data (table edits, recompiled translations).


function ListIds

inline virtual TArray< FString > UTryllTextProvider::ListIds (
    FName Table
) const

function ListLocales

inline virtual TArray< FString > UTryllTextProvider::ListLocales () const

function OpenInEditor

inline virtual bool UTryllTextProvider::OpenInEditor (
    FName Table,
    const FString & Id,
    FString & OutMessage
) const

Jump to the table entry in the editor. False with OutMessage when the table has no editor.


function SupportsEditorPreview

inline virtual bool UTryllTextProvider::SupportsEditorPreview () const

Editor preview. The string-table provider supports it. A Blueprint-only provider returns false and the details panel shows no preview.


Public Static Functions Documentation

function BroadcastLocaleChanged

static void UTryllTextProvider::BroadcastLocaleChanged () 

function CurrentProviderLocale

static FString UTryllTextProvider::CurrentProviderLocale () 

The provider's current language, or empty when no provider is set.


function Get

static UTryllTextProvider * UTryllTextProvider::Get () 

The instance from the project settings class, or null when the class is None.


function LocaleForLanguageChange

static bool UTryllTextProvider::LocaleForLanguageChange (
    bool bSessionLocaleExplicit,
    FString & OutLocale
) 

Session language to send after a language change. False (send nothing) when there is no provider or CreateSession was given an explicit locale. An empty provider language falls back to UTryllRuntimeSettings::Locale, never "".


function OnLocaleChanged

static FSimpleMulticastDelegate & UTryllTextProvider::OnLocaleChanged () 

Raised after the game's language changed. Game and editor subsystems both listen.


function ResolveSessionLocale

static FString UTryllTextProvider::ResolveSessionLocale () 

Session language for an empty CreateSession locale: the provider's current language when one is set, otherwise UTryllRuntimeSettings::Locale.



The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllTextProvider.h