This class is designed for dealing with multi-language text translation in TerraLib. More...
Go to the source code of this file.
Macros | |
Internationalization Defines | |
Flags for TerraLib code internationalization. | |
#define | TERRALIB_TEXT_DOMAIN "terralib" |
It contains the name of the text domain used in the translation of messages in TerraLib. More... | |
#define | TERRALIB_TEXT_DOMAIN_DIR "locale" |
It contains the translation catalog directory. More... | |
#define | TE_ADD_TEXT_DOMAIN(domain, domaindir, codeset) ((void)0) |
It adds the given text domain located at domain-dir with the given codeset to the multilingual system. More... | |
#define | TE_GENERAL_TR(message, domain) message |
Try to translate the message according to the given domain. See the TE_TR macro for more infomation on how to create a translation mark for your code. More... | |
#define | TE_GENERAL_TR_PLURAL(domain, message1, message2, n) (n > 1 ? message2 : message1) |
Try to translate the message according to the given domain and plural form. See the TE_TR_PLURAL macro for more infomation on how to create a translation mark for your code. More... | |
#define | TE_TR(message) TE_GENERAL_TR(message, TERRALIB_TEXT_DOMAIN) |
It marks a string in order to get translated. More... | |
#define | TE_TR_PLURAL(message1, message2, n) TE_GENERAL_TR_PLURAL(TERRALIB_TEXT_DOMAIN, message1, message2, n) |
It marks a string in order to get translated according to plural form. More... | |
This class is designed for dealing with multi-language text translation in TerraLib.
Definition in file Translator.h.
#define TE_ADD_TEXT_DOMAIN | ( | domain, | |
domaindir, | |||
codeset | |||
) | ((void)0) |
It adds the given text domain located at domain-dir with the given codeset to the multilingual system.
Definition at line 309 of file Translator.h.
#define TE_GENERAL_TR | ( | message, | |
domain | |||
) | message |
Try to translate the message according to the given domain. See the TE_TR macro for more infomation on how to create a translation mark for your code.
Definition at line 320 of file Translator.h.
#define TE_GENERAL_TR_PLURAL | ( | domain, | |
message1, | |||
message2, | |||
n | |||
) | (n > 1 ? message2 : message1) |
Try to translate the message according to the given domain and plural form. See the TE_TR_PLURAL macro for more infomation on how to create a translation mark for your code.
Definition at line 331 of file Translator.h.
#define TE_TR | ( | message | ) | TE_GENERAL_TR(message, TERRALIB_TEXT_DOMAIN) |
It marks a string in order to get translated.
Example of usage:
Definition at line 346 of file Translator.h.
Referenced by te::cl::KMeans< TTRAIN, TCLASSIFY >::classify(), te::rst::PolygonIterator< T >::decompose(), te::gdal::GetGDALRessamplingMethod(), te::cl::Dummy< TTRAIN, TCLASSIFY >::initialize(), te::cl::KMeans< TTRAIN, TCLASSIFY >::initialize(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::insert(), te::rst::LineIterator< T >::LineIterator(), te::common::ParameterizedAbstractFactory< TPRODUCT, TFACTORYKEY, TPARAM, TKEYCOMPARE >::make(), te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make(), te::rst::PointSetIterator< T >::PointSetIterator(), te::rst::PolygonIterator< T >::PolygonIterator(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::remove(), and te::cl::KMeans< TTRAIN, TCLASSIFY >::train().
#define TE_TR_PLURAL | ( | message1, | |
message2, | |||
n | |||
) | TE_GENERAL_TR_PLURAL(TERRALIB_TEXT_DOMAIN, message1, message2, n) |
It marks a string in order to get translated according to plural form.
Example of usage:
In the above example, the parameter n can be a threshold that helps to choose between the first or the second construction. If your trabslation file is configured with a theashold of 1, indicating that if n > 1 must choose the second construction, the plural versin will be choosed, otherwise, it will choose the singular form (the fisrt one).
Definition at line 369 of file Translator.h.
#define TERRALIB_TEXT_DOMAIN "terralib" |
It contains the name of the text domain used in the translation of messages in TerraLib.
Definition at line 283 of file Translator.h.
#define TERRALIB_TEXT_DOMAIN_DIR "locale" |
It contains the translation catalog directory.
Definition at line 290 of file Translator.h.