source: trunk/IPs/systemC/processor/Morpheo/Common/src/Translation.cpp @ 144

Last change on this file since 144 was 144, checked in by rosiere, 14 years ago

1) compatible gcc 4.4.3
2) Translation file in MORPHEO_PREFIX directory

  • Property svn:keywords set to Id
File size: 725 bytes
Line 
1/*
2 * $Id: Translation.cpp 144 2010-09-28 11:19:10Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Common/include/Environment.h"
9#include "Common/include/Translation.h"
10#include "Common/include/ErrorMorpheo.h"
11
12namespace morpheo {
13
14#ifdef TRANSLATION
15  static bool translation_initialized;
16#endif
17
18  void translation (void)
19  {
20#ifdef TRANSLATION
21    if (not translation_initialized)
22      {
23        environment();
24       
25        std::string dirname = MORPHEO_PREFIX;
26        dirname += "/locale";
27
28        if (bindtextdomain(MORPHEO_PACKAGE,dirname.c_str()) == NULL)
29          throw ERRORMORPHEO("Translation","Error in set directory containing message catalogs.\n");
30       
31        translation_initialized = true;
32      }
33#endif   
34  }
35
36}; // end namespace morpheo
Note: See TracBrowser for help on using the repository browser.