Interface ILocalizationService

Namespace
FTK2.ModAPI.Localization
Assembly
FTK2.ModAPI.dll

Registers and inspects owner-scoped English localization keys.

public interface ILocalizationService

Remarks

Calls are main-thread-only. Registration may wait for game data; a native-key conflict is preserved rather than overwritten.

Properties

Entries

Gets a snapshot of this owner's localization registrations.

IReadOnlyList<LocalizationEntry> Entries { get; }

Property Value

IReadOnlyList<LocalizationEntry>

Methods

TryGetEnglish(ContentId, out string?)

Gets an English value registered through this service.

bool TryGetEnglish(ContentId id, out string? text)

Parameters

id ContentId
text string

Returns

bool

TryRegisterEnglish(ContentId, string, out string?)

Registers an English value under a content ID owned by the current mod.

bool TryRegisterEnglish(ContentId id, string text, out string? error)

Parameters

id ContentId
text string
error string

Returns

bool

TryRemove(ContentId, out string?)

Removes an owned localization registration and its exact published value when safe.

bool TryRemove(ContentId id, out string? error)

Parameters

id ContentId
error string

Returns

bool