- Timestamp:
- Dec 10, 2008, 7:31:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Common/src/Translation.cpp
r82 r88 6 6 */ 7 7 8 #include "../include/Translation.h" 9 #include "../include/ErrorMorpheo.h" 8 #include "Common/include/Environment.h" 9 #include "Common/include/Translation.h" 10 #include "Common/include/ErrorMorpheo.h" 10 11 11 12 namespace morpheo { 12 13 13 Translation:: Translation (void) 14 static bool translation_initialized; 15 16 void translation (void) 14 17 { 15 #ifndef NO_TRANSLATION 16 char * top_level = getenv("MORPHEO_TOPLEVEL"); 17 18 if (top_level == NULL) 19 throw ERRORMORPHEO("Translation","Error morpheo environment is not positioned\n"); 20 21 std::string dirname = top_level; 22 dirname += "IPs/systemC/processor/Morpheo/locale"; 18 #ifdef TRANSLATION 19 if (not translation_initialized) 20 { 21 environment(); 22 23 std::string dirname = MORPHEO_TOPLEVEL; 24 dirname += "/IPs/systemC/processor/Morpheo/locale"; 23 25 24 bindtextdomain(MORPHEO_PACKAGE,dirname.c_str()); 26 if (bindtextdomain(MORPHEO_PACKAGE,dirname.c_str()) == NULL) 27 throw ERRORMORPHEO("Translation","Error in set directory containing message catalogs.\n"); 28 29 translation_initialized = true; 30 } 25 31 #endif 26 32 } 27 33 28 Translation::~Translation (void)29 {30 31 }32 33 34 }; // end namespace morpheo
Note: See TracChangeset
for help on using the changeset viewer.