Skip to content

Class UTryllStringTableTextProvider

ClassList > UTryllStringTableTextProvider

More...

  • #include <TryllStringTableTextProvider.h>

Inherits the following classes: UTryllTextProvider

Public Functions

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

Public Functions inherited from UTryllTextProvider

See UTryllTextProvider

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
bool FindOrLoadTable (FName TableId, FName & OutResolvedId)

Public Static Functions inherited from UTryllTextProvider

See UTryllTextProvider

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

Protected Functions

Type Name
virtual FString GetCurrentLocale_Implementation () override const
virtual bool GetText_Implementation (FName Table, const FString & Id, FString & OutText) override const

Detailed Description

Reads Unreal string tables (FText::FromStringTable) and follows the game culture. Opt-in: pick it in Project Settings → Tryll Client → Text Provider.

Smart-string formatting is not applied: the table text is sent as authored, so {} is not nested inside Mustache {{ }}.

A table that is not loaded yet is loaded on first use (blocking, game thread). The language-change signal fires after Unreal has loaded the new language's text (FTextLocalizationManager::OnTextRevisionChangedEvent), never before.

Public Functions Documentation

function BeginDestroy

virtual void UTryllStringTableTextProvider::BeginDestroy () override

function GetTextForPreview

virtual bool UTryllStringTableTextProvider::GetTextForPreview (
    FName Table,
    const FString & Id,
    const FString & Locale,
    FString & OutText
) override const

Exact text for Locale, read from that culture's compiled .locres files without changing the editor or game culture. The native culture reads the table source. False when Locale has no translation (or only a stale one) for the entry.

Implements UTryllTextProvider::GetTextForPreview


function InvalidatePreviewCache

virtual void UTryllStringTableTextProvider::InvalidatePreviewCache () override

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

Implements UTryllTextProvider::InvalidatePreviewCache


function ListIds

virtual TArray< FString > UTryllStringTableTextProvider::ListIds (
    FName Table
) override const

Implements UTryllTextProvider::ListIds


function ListLocales

virtual TArray< FString > UTryllStringTableTextProvider::ListLocales () override const

Implements UTryllTextProvider::ListLocales


function OpenInEditor

virtual bool UTryllStringTableTextProvider::OpenInEditor (
    FName Table,
    const FString & Id,
    FString & OutMessage
) override const

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

Implements UTryllTextProvider::OpenInEditor


function PostInitProperties

virtual void UTryllStringTableTextProvider::PostInitProperties () override

function SupportsEditorPreview

inline virtual bool UTryllStringTableTextProvider::SupportsEditorPreview () override const

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

Implements UTryllTextProvider::SupportsEditorPreview


Public Static Functions Documentation

function FindOrLoadTable

static bool UTryllStringTableTextProvider::FindOrLoadTable (
    FName TableId,
    FName & OutResolvedId
) 

Find a registered string table, loading its asset when needed. Game thread only.


Protected Functions Documentation

function GetCurrentLocale_Implementation

virtual FString UTryllStringTableTextProvider::GetCurrentLocale_Implementation () override const

function GetText_Implementation

virtual bool UTryllStringTableTextProvider::GetText_Implementation (
    FName Table,
    const FString & Id,
    FString & OutText
) override const


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