30 #ifndef __TERRALIB_CORE_TRANSLATOR_TRANSLATOR_H__    31 #define __TERRALIB_CORE_TRANSLATOR_TRANSLATOR_H__    34 #include "../Config.h"    35 #include "../../BuildConfig.h"   105         std::string translate(
const std::string& message);
   119         std::string translate(
const char* message);
   135         std::string translate(
const std::string& msg1,
   136                               const std::string& msg2,
   153         std::string translate(
const char* msg1,
   162         void setLocale(
const std::string &locale);
   173         void addTextDomain(
const std::string& textDomain, 
const std::string& dir);
   181         bool exist(
const std::string& textDomain);
   209 #ifdef TERRALIB_TRANSLATOR_ENABLED   211 #error "The TE_TR macro has been already defined by another application or code. Please, inform TerraLib Development Team <terralib-team@dpi.inpe.br>, we will be glad to help solving this problem!"   223 #ifdef TERRALIB_TRANSLATOR_ENABLED   224   #define TE_ADD_TEXT_DOMAIN(domain, dir) te::core::Translator::instance().addTextDomain(domain, dir)   226   #define TE_ADD_TEXT_DOMAIN(domain, dir) ((void)0)   243 #define TE_TR(message) te::core::Translator::instance().translate(message).c_str()   270 #define TE_TR_PLURAL(message1, message2, n) te::core::Translator::instance().translate(message1, message2, n).c_str()   279 #define TE_TR_LANGUAGE(locale) te::core::Translator::instance().setLocale(locale)   281 #endif  // __TERRALIB_CORE_TRANSLATOR_TRANSLATOR_H__ This singleton is designed to deal with multi-language text translation in TerraLib. 
 
std::string m_locale
If not empty, it is the current locale. 
 
~Translator()
Singleton destructor must be private or protected. 
 
Translator()
Singleton constructor must be private or protected. 
 
std::map< std::string, std::vector< std::string > > m_textDomainMap
A vector from text domains to base directory for the message catalog.