Table of Contents

Class TranslationService

Namespace
Uncreated.Warfare.Translations
Assembly
Uncreated.Warfare.dll
public class TranslationService : ITranslationService
Inheritance
TranslationService
Implements
Inherited Members

Constructors

TranslationService(IServiceProvider, IConfiguration)

public TranslationService(IServiceProvider serviceProvider, IConfiguration systemConfig)

Parameters

serviceProvider IServiceProvider
systemConfig IConfiguration

Fields

TranslationsFolder

public const string TranslationsFolder = "Translations"

Field Value

string

Properties

LanguageService

Service used to handle per-player language and culture settings.

public LanguageService LanguageService { get; }

Property Value

LanguageService

SetOf

Accessor for enumerating certain player groups based on their language settings.

public LanguageSets SetOf { get; }

Property Value

LanguageSets

TerminalColoring

The coloring style used for terminals.

public StackColorFormatType TerminalColoring { get; }

Property Value

StackColorFormatType

Remarks

Only StackCleaner.StackColorFormatType.ANSIColor and StackCleaner.StackColorFormatType.ExtendedANSIColor is supported.

TranslationCollections

Dictionary of all translation collections with their types as a key.

public IReadOnlyDictionary<Type, TranslationCollection> TranslationCollections { get; }

Property Value

IReadOnlyDictionary<Type, TranslationCollection>

ValueFormatter

Service used to format translation arguments.

public ITranslationValueFormatter ValueFormatter { get; }

Property Value

ITranslationValueFormatter

Methods

Get<T>()

Get a translation collection from this provider.

public T Get<T>() where T : TranslationCollection, new()

Returns

T

Type Parameters

T

ReloadAll()

Reload all translation collections.

public void ReloadAll()