SourceManagement

A builder class for providing sources list for the Configuration object.

This class provides methods for registering and retrieving translation sources for various language codes. A translation source is an object that implements the TranslationSource interface and provides methods for translating texts from one language to another. The class uses a mutable map of strings and TranslationSource objects as its internal data structure. The map stores the language codes and the corresponding translation sources that are registered by the class.

Author

TOTHTOMI

Since

Jul. 25, 2023

Constructors

Link copied to clipboard
constructor()

Creates a new SourceManagement object with an empty map of sources.

Functions

Link copied to clipboard

Builds and returns a new immutable map of strings and TranslationSource objects based on the current state of the sources map.

Link copied to clipboard
fun registerSource(languageCode: String, translationSource: TranslationSource)

Registers a translation source for a language code.