This API allows you to translate your program. Read the internationalization guide for more detail.
Global Namespaces
namespace qi
Classes (namespace qi)
class qi::Translator
Functions (namespace qi)
Localization of your source code. More...
#include <qi/translator.hpp>
noncopyable
Translator
(const std::string& name)~Translator
()translate
(const std::string& msg, const std::string& domain, const std::string& locale, const std::string& context)translateContext
(const std::string& msg, const std::string& context)setCurrentLocale
(const std::string& locale)setDefaultDomain
(const std::string& domain)addDomain
(const std::string& domain)make your application or library speak in the user’s language.
qi::Translator::
Translator
(const std::string& name)¶Brief: Constructor.
Parameters: |
|
---|
qi::Translator::
~Translator
()¶qi::Translator::
translate
(const std::string& msg, const std::string& domain = "", const std::string& locale = "", const std::string& context = "")¶Brief: Translate a message.
Parameters: |
|
---|---|
Returns: | The translated message |
qi::Translator::
translateContext
(const std::string& msg, const std::string& context)¶Brief: Translate a message with a specific context.
Parameters: |
|
---|---|
Returns: | The translated message |
qi::Translator::
setCurrentLocale
(const std::string& locale)¶Brief: Change the locale at runtime.
Parameters: |
|
---|
qi::Translator::
setDefaultDomain
(const std::string& domain)¶Brief: Set the default Domain.
Parameters: |
|
---|
qi::Translator::
addDomain
(const std::string& domain)¶Brief: Add a new dicationary of messages.
Parameters: |
|
---|
qi::
defaultTranslator
(const std::string& name)¶Brief: Get a reference on the default Translator.
Parameters: |
|
---|---|
Returns: | A reference on default qi::Translator |
qi::
tr
(const std::string&, const std::string&, const std::string&)¶