This class is designed for dealing with multi-language text translation in TerraLib. More...
Go to the source code of this file.
Classes | |
| class | te::core::Translator |
| This singleton is designed to deal with multi-language text translation in TerraLib. More... | |
Namespaces | |
| namespace | boost |
| namespace | boost::locale |
| namespace | te |
| TerraLib. | |
| namespace | te::core |
Macros | |
| #define | TE_ADD_TEXT_DOMAIN(domain, dir) |
| It adds the given text domain and its directory to the multilingual system. | |
| #define | TE_TR(message) |
| It marks a string in order to get translated. | |
| #define | TE_TR_LANGUAGE(locale) |
| It sets the locale for the Translator. | |
| #define | TE_TR_PLURAL(message1, message2, n) |
| It marks a string in order to get translated according to plural form. | |
This class is designed for dealing with multi-language text translation in TerraLib.
Definition in file Translator.h.
| #define TE_ADD_TEXT_DOMAIN | ( | domain, | |
| dir ) |
It adds the given text domain and its directory to the multilingual system.
| domain | A given message domain (just a name). A text domain is the name of the catalog used to translate the message. |
| dir | Where the text domain is located. |
Definition at line 247 of file Translator.h.
| #define TE_TR | ( | message | ) |
It marks a string in order to get translated.
| message | The text to be translated. |
Example of usage:
Definition at line 264 of file Translator.h.
Referenced by te::map::RasterTransform::BandBufferInfo::BandBufferInfo(), te::cl::KMeans< TTRAIN, TCLASSIFY >::classify(), te::rst::PolygonIterator< T >::getIntersectionRanges(), te::map::GroupingByStdDeviation(), te::cl::Dummy< TTRAIN, TCLASSIFY >::initialize(), te::cl::KMeans< TTRAIN, TCLASSIFY >::initialize(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::insert(), te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make(), te::common::ParameterizedAbstractFactory< TPRODUCT, TFACTORYKEY, TPARAM, TKEYCOMPARE >::make(), te::rst::PointSetIterator< T >::PointSetIterator(), te::rst::PolygonIterator< T >::PolygonIterator(), te::rst::PolygonIterator< T >::PolygonIterator(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::remove(), and te::cl::KMeans< TTRAIN, TCLASSIFY >::train().
| #define TE_TR_LANGUAGE | ( | locale | ) |
It sets the locale for the Translator.
| locale | A string of the new locale. |
Definition at line 300 of file Translator.h.
| #define TE_TR_PLURAL | ( | message1, | |
| message2, | |||
| n ) |
It marks a string in order to get translated according to plural form.
| message1 | The singular form of the text to be translated. |
| message2 | The plural form of the text to be translated. |
| n | This parameter is used to determine the 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 291 of file Translator.h.