libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
qi::Translator Class Reference

#include <translator.hpp>

Public Member Functions

 Translator (const std::string &name)
 Constructor. More...
 
 ~Translator ()
 
std::string translate (const std::string &msg, const std::string &domain="", const std::string &locale="")
 Translate a message. More...
 
void setCurrentLocale (const std::string &locale)
 Change the locale at runtime. More...
 
void setDefaultDomain (const std::string &domain)
 Set the default Domain. More...
 
void addDomain (const std::string &domain)
 Add a new dicationary of messages. More...
 

Detailed Description

Definition at line 17 of file translator.hpp.

Constructor & Destructor Documentation

qi::Translator::Translator ( const std::string &  name)

Constructor.

Parameters
nameApplication or Library name
qi::Translator::~Translator ( )

Member Function Documentation

qi::Translator::addDomain ( const std::string &  domain)

Add a new dicationary of messages.

Parameters
domainDomain name.
qi::Translator::setCurrentLocale ( const std::string &  locale)

Change the locale at runtime.

Parameters
localeLocale name formatted as xx_XX (country and language code).
qi::Translator::setDefaultDomain ( const std::string &  domain)

Set the default Domain.

Parameters
domainDomain name.
qi::Translator::translate ( const std::string &  msg,
const std::string &  domain = "",
const std::string &  locale = "" 
)

Translate a message.

Parameters
messageMessage
domainDomain name
localeLocale name
Returns
The translated message

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