BMC Engine v1.0.0
An open-source game engine powered by C and C++
Loading...
Searching...
No Matches
Translator Class Reference

#include <Translator.h>

Public Member Functions

 Translator (std::string locale)
 
std::string translate (std::string key)
 

Detailed Description

Reads & translates keys for the current locale.

Constructor & Destructor Documentation

◆ Translator()

Translator::Translator ( std::string locale)

Create the translator object

Parameters
localeThe language, ex en-US.

Member Function Documentation

◆ translate()

std::string Translator::translate ( std::string key)

Translate a key to the selected locale.

Parameters
keyThe key to translate.
Returns
An std::string of the translated key.

The documentation for this class was generated from the following files: