1.14.0.5
Hummingbird
A modern user interface library for games
cohtml::ILocalizationManager Class Referenceabstract

Takes care of translating text between different locales. More...

Public Member Functions

virtual const char * Translate (const char *text)=0
 Translates the given text in the currently selected language. The returned value must be UTF-8 encoded and outlive the method - it's safe to delete the string on the next call to this method or after the system has been uninitialized. Return nullptr if there's no translation for the text. Your application must take care of tracking the current locale and translating the text according to it. More...
 

Detailed Description

Takes care of translating text between different locales.

Warning
THIS CLASS MUST BE THREAD-SAFE as it WILL be called from different threads

Member Function Documentation

◆ Translate()

virtual const char* cohtml::ILocalizationManager::Translate ( const char *  text)
pure virtual

Translates the given text in the currently selected language. The returned value must be UTF-8 encoded and outlive the method - it's safe to delete the string on the next call to this method or after the system has been uninitialized. Return nullptr if there's no translation for the text. Your application must take care of tracking the current locale and translating the text according to it.

Parameters
textthe key to the text that needs translation
Returns
the translation of the given text, encoded in UTF-8