From a6272c9b3101ef0f3f923525d0db33730185bcc9 Mon Sep 17 00:00:00 2001
From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org>
Date: Thu, 10 Sep 2009 10:32:50 +0800
Subject: [PATCH] ENH: internationalization working with macro

---
 ViewerManager/View/otbImageViewerManagerViewGroup.fl | 8 ++++----
 ViewerManager/otbImageViewerManager.cxx              | 8 +++-----
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/ViewerManager/View/otbImageViewerManagerViewGroup.fl b/ViewerManager/View/otbImageViewerManagerViewGroup.fl
index d3120712f4..42b3117d4d 100644
--- a/ViewerManager/View/otbImageViewerManagerViewGroup.fl
+++ b/ViewerManager/View/otbImageViewerManagerViewGroup.fl
@@ -1,8 +1,8 @@
 # data file for the Fltk User Interface Designer (fluid)
 version 1.0109 
 i18n_type 1 
-i18n_include <libintl.h> 
-i18n_function gettext 
+i18n_include "otbI18n.h" 
+i18n_function otbGetTextMacro 
 header_name {.h} 
 code_name {.cxx}
 class ImageViewerManagerViewGroup {open
@@ -12,7 +12,7 @@ class ImageViewerManagerViewGroup {open
     Fl_Window guiMainWindow {
       label otbImageViewerManagerView
       callback {this->Quit()} open selected
-      xywh {666 76 610 460} type Double box UP_BOX color 52 selection_color 7 labelcolor 187 resizable visible
+      xywh {160 106 610 460} type Double box UP_BOX color 52 selection_color 7 labelcolor 187 resizable visible
     } {
       Fl_Text_Display guiViewerInformation {
         label Information
@@ -171,7 +171,7 @@ class ImageViewerManagerViewGroup {open
     }
     Fl_Window guiLinkSetupWindow {
       label {Link Images} open
-      xywh {716 336 560 220} type Double box UP_BOX color 52 selection_color 7 labelcolor 187 resizable visible
+      xywh {397 582 560 220} type Double box UP_BOX color 52 selection_color 7 labelcolor 187 resizable visible
     } {
       Fl_Input guiLinkXOffset {
         label {X offset}
diff --git a/ViewerManager/otbImageViewerManager.cxx b/ViewerManager/otbImageViewerManager.cxx
index 8927f5814e..b9327bf4ee 100644
--- a/ViewerManager/otbImageViewerManager.cxx
+++ b/ViewerManager/otbImageViewerManager.cxx
@@ -21,14 +21,12 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbCommandLineArgumentParser.h"
 #include "otbMsgReporter.h"
 
-#include <libintl.h>
-
+#include "otbI18n.h"
 
 int main(int argc, char* argv[])
 {
-      setlocale( LC_ALL, "" );
-      bindtextdomain( "messages", "/home/christop/OTB/OTB-Binary-Applications-Debug/locale" );
-      textdomain( "messages" );
+
+    otbI18nMacro();
 
   // Parse command line parameters
 //   typedef otb::CommandLineArgumentParser ParserType;
-- 
GitLab