#endif
#if defined(ENABLE_NLS) && defined(HAVE_LOCALE_H)
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE_NAME, LOCALEDIR);
- textdomain (PACKAGE_NAME);
+ if (!setlocale (LC_ALL, "")) {
+ fprintf(stderr,"SARG: Cannot set the locale LC_ALL to the environment variable\n");
+ exit(EXIT_FAILURE);
+ }
+ if (!bindtextdomain (PACKAGE_NAME, LOCALEDIR)) {
+ fprintf(stderr,"SARG: Cannot bind to text domain %s in directory %s (%s)\n",PACKAGE_NAME,LOCALEDIR,strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ if (!textdomain (PACKAGE_NAME)) {
+ fprintf(stderr,"SARG: Cannot set gettext domain for %s PACKAGE_NAME (%s)\n",PACKAGE_NAME,strerror(errno));
+ exit(EXIT_FAILURE);
+ }
#endif //ENABLE_NLS
BgImage[0]='\0';