createNew

fun <P : IMessageProvider<C>, C> createNew(textComponentFactory: (String) -> C, expectedType: KClass<out MessageKey<P, C>>, isDebug: Boolean = false): LangMan<P, C>

Initializes a new instance of LangMan and sets it as the current instance.

Return

The newly created LangMan instance.

Parameters

textComponentFactory

Factory function to create message content.

expectedType

The expected message key type to ensure type safety.

isDebug

Whether debug mode should be enabled.