コード例 #1
0
ファイル: gpg-error.c プロジェクト: BogdanStroe/cubrid
static void
i18n_init (void)
{
#ifdef ENABLE_NLS
  char *locale_dir;
  
#ifdef HAVE_LC_MESSAGES
  setlocale (LC_TIME, "");
  setlocale (LC_MESSAGES, "");
#else
# ifndef HAVE_W32_SYSTEM
  setlocale (LC_ALL, "" );
# endif
#endif
  
  /* Note that for this program we would only need the textdomain call
     because libgpg-error already initializes itself to its locale dir
     (via gpg_err_init or a constructor).  However this is only done
     for the static standard locale and thus if the above setlocale
     calls select a different locale the bindtext below will do
     something else.  */

  locale_dir = get_locale_dir ();
  if (locale_dir)
    {
      bindtextdomain (PACKAGE, locale_dir);
      drop_locale_dir (locale_dir);
    }
  textdomain (PACKAGE);
#endif
}
コード例 #2
0
static void
real_init (void)
{
#ifdef ENABLE_NLS
  char *locale_dir;

  /* We only have to bind our locale directory to our text domain.  */
  locale_dir = get_locale_dir ();
  if (locale_dir)
    {
      bindtextdomain (PACKAGE, locale_dir);
      drop_locale_dir (locale_dir);
    }
#endif
}