home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / libgimp / gimpintl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-06  |  2.3 KB  |  67 lines

  1. /* LIBGIMP - The GIMP Library                                                   
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball                
  3.  *
  4.  * gimpintl.h
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.             
  10.  *                                                                              
  11.  * This library is distributed in the hope that it will be useful,              
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of               
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU            
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #ifndef __GIMPINTL_H__
  23. #define __GIMPINTL_H__
  24.  
  25. #include <glib.h>
  26. #include <locale.h>
  27.  
  28. /* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com>
  29.  * Heavily modified by Daniel Egger <Daniel.Egger@t-online.de>
  30.  * So be sure to hit me instead of him if something is wrong here
  31.  */ 
  32.  
  33. #ifndef LOCALEDIR
  34. #define LOCALEDIR g_strconcat (gimp_data_directory (), \
  35.                    G_DIR_SEPARATOR_S, \
  36.                    "locale", \
  37.                    NULL)
  38. #endif
  39.  
  40. #ifdef ENABLE_NLS
  41. #    include <libintl.h>
  42. #    define _(String) gettext (String)
  43. #    ifdef gettext_noop
  44. #        define N_(String) gettext_noop (String)
  45. #    else
  46. #        define N_(String) (String)
  47. #    endif
  48. #else
  49. /* Stubs that do something close enough.  */
  50. #    define textdomain(String) (String)
  51. #    define gettext(String) (String)
  52. #    define dgettext(Domain,Message) (Message)
  53. #    define dcgettext(Domain,Message,Type) (Message)
  54. #    define bindtextdomain(Domain,Directory) (Domain)
  55. #    define _(String) (String)
  56. #    define N_(String) (String)
  57. #endif
  58.  
  59. #define INIT_LOCALE( domain )    G_STMT_START{    \
  60.     gtk_set_locale ();            \
  61.     setlocale (LC_NUMERIC, "C");        \
  62.     bindtextdomain (domain, LOCALEDIR);    \
  63.     textdomain (domain);            \
  64.                 }G_STMT_END
  65.  
  66. #endif /* __GIMPINTL_H__ */
  67.