Hello,

I tried several things, and now how to get it working:

- libintl.h and loclae.h have to be included.
- bindtextdomain("rs274_err","/usr/share/locale"); setlocale(LC_ALL,""); 
textdomain("rs274_err"); have to be called in main function.

But I do not know how to programm this in clan way and do the 
Makefile/configure stuff.
Regards
Florian

What I tried (same in rs274ngc_errors.cc):
*** emctaskmain-old.cc    2006-11-05 00:36:40.000000000 +0100
--- emctaskmain.cc    2007-02-11 01:13:42.000000000 +0100
***************
*** 57,63 ****
  #include <unistd.h>        // fork()
  #include <sys/wait.h>        // waitpid(), WNOHANG, WIFEXITED
  #include <ctype.h>        // isspace()
- #include <libintl.h>
  }
  #include "rcs.hh"        // NML classes, nmlErrorFormat()
  #include "emc.hh"        // EMC NML
--- 57,62 ----
***************
*** 66,71 ****
--- 65,72 ----
  #include "interpl.hh"        // NML_INTERP_LIST, interp_list
  #include "emcglb.h"        // EMC_INIFILE,NMLFILE, EMC_TASK_CYCLE_TIME
  #include "interp_return.hh"    // public interpreter return values
+ #include <libintl.h>    // i18n (gettext)
+ #include <locale.h>     // i18n (gettext)
  #ifdef USE_NLS
  #define _(string) gettext(string)
  #else
***************
*** 2717,2722 ****
--- 2718,2728 ----
    */
  int main(int argc, char *argv[])
  {
+     // Settings for gettext
+     bindtextdomain("rs274_err","/usr/share/locale");
+     setlocale(LC_ALL,"");
+     textdomain("rs274_err");
+
      int taskAborted = 0;    // flag to prevent flurry of task aborts
      int taskPlanError = 0;
      int taskExecuteError = 0;


SourceForge.net schrieb:
> Bugs item #1650938, was opened at 2007-02-02 12:37
> Message generated for change (Tracker Item Submitted) made by Item Submitter
> You can respond by visiting: 
> https://sourceforge.net/tracker/?func=detail&atid=106744&aid=1650938&group_id=6744
>
> Please note that this message will contain a full copy of the comment thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: EMC2 Motion Controller
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: Nobody/Anonymous (nobody)
> Assigned to: John Kasunich (jmkasunich)
> Summary: Translation strings from rs274_err.mo are not shown
>
> Initial Comment:
> Exampe:
> Shell: export LANG = de
> Start EMC2 with TkEMC, choose 'home'. The resultig error message should be in 
> german but is in english.
>
> In Axis ist works, because Axis includes the .mo file itself.
>
> Perhaps rs274_err.mo is not defined in rs274ngc_errors.cc?
>
> ----------------------------------------------------------------------
>
> You can respond by visiting: 
> https://sourceforge.net/tracker/?func=detail&atid=106744&aid=1650938&group_id=6744
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to