Constructs a new instance of the Translator class.
Optional
locale: Locale = {}An object representing the initial locale configuration.
Optional
transform: ((str: string) => string)A function for transforming strings.
Optional
config: Partial<ITranslateConfig> = {}An object representing additional configuration options.
Readonly
configAn object representing additional configuration options.
Creates and returns an element based on the provided type, props, and children.
The type of the element to create.
The properties or attributes to assign to the element.
Rest
...children: any[]The child elements or content to append to the element.
Translates the given text to another language.
The text to be translated.
The translated text.
Create an element using the given type and props
The type of the element
The props for the element
Static
installInstalls the Translate object and configures React.
Rest
...params: [locale: Locale, transform?: ((str: string) => string), config: Partial<ITranslateConfig>]The parameters needed to create a new Translate instance.
The installed Translate object.
Translate class for handling text translation and transformation.