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
Methods
TryGetEnglish(ContentId, out string?)
Gets an English value registered through this service.
bool TryGetEnglish(ContentId id, out string? text)
Parameters
Returns
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
Returns
TryRemove(ContentId, out string?)
Removes an owned localization registration and its exact published value when safe.
bool TryRemove(ContentId id, out string? error)