mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
@ Added support for bind_textdomain_codeset(). (rudib@email.si)
This commit is contained in:
parent
8ee38d9d75
commit
8f26c3f326
@ -48,5 +48,6 @@ if test "$PHP_GETTEXT" != "no"; then
|
|||||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, ngettext, [AC_DEFINE(HAVE_NGETTEXT, 1, [ ])])
|
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, ngettext, [AC_DEFINE(HAVE_NGETTEXT, 1, [ ])])
|
||||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dngettext, [AC_DEFINE(HAVE_DNGETTEXT, 1, [ ])])
|
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dngettext, [AC_DEFINE(HAVE_DNGETTEXT, 1, [ ])])
|
||||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dcngettext, [AC_DEFINE(HAVE_DCNGETTEXT, 1, [ ])])
|
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dcngettext, [AC_DEFINE(HAVE_DCNGETTEXT, 1, [ ])])
|
||||||
|
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, bind_textdomain_codeset, [AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET, 1, [ ])])
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -49,6 +49,11 @@ function_entry php_gettext_functions[] = {
|
|||||||
#if HAVE_DCNGETTEXT
|
#if HAVE_DCNGETTEXT
|
||||||
PHP_FE(dcngettext, NULL)
|
PHP_FE(dcngettext, NULL)
|
||||||
#endif
|
#endif
|
||||||
|
#if HAVE_BIND_TEXTDOMAIN_CODESET
|
||||||
|
PHP_FE(bind_textdomain_codeset, NULL)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
/* }}} */
|
/* }}} */
|
||||||
@ -269,6 +274,30 @@ PHP_FUNCTION(dcngettext)
|
|||||||
/* }}} */
|
/* }}} */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_BIND_TEXTDOMAIN_CODESET
|
||||||
|
|
||||||
|
/* {{{ proto string bind_textdomain_codeset (string domain, string codeset)
|
||||||
|
Specify the character encoding in which the messages from the DOMAIN message catalog will be returned. */
|
||||||
|
PHP_FUNCTION(bind_textdomain_codeset)
|
||||||
|
{
|
||||||
|
zval **domain, **codeset;
|
||||||
|
char *retval;
|
||||||
|
|
||||||
|
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &domain, &codeset) == FAILURE) {
|
||||||
|
WRONG_PARAM_COUNT;
|
||||||
|
} else {
|
||||||
|
convert_to_string_ex(domain);
|
||||||
|
convert_to_string_ex(codeset);
|
||||||
|
|
||||||
|
retval = bind_textdomain_codeset(Z_STRVAL_PP(domain), Z_STRVAL_PP(codeset));
|
||||||
|
|
||||||
|
RETURN_STRING(retval, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* HAVE_LIBINTL */
|
#endif /* HAVE_LIBINTL */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -45,6 +45,9 @@ PHP_FUNCTION(dngettext);
|
|||||||
#if HAVE_DCNGETTEXT
|
#if HAVE_DCNGETTEXT
|
||||||
PHP_FUNCTION(dcngettext);
|
PHP_FUNCTION(dcngettext);
|
||||||
#endif
|
#endif
|
||||||
|
#if HAVE_BIND_TEXTDOMAIN_CODESET
|
||||||
|
PHP_FUNCTION(bind_textdomain_codeset);
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define gettext_module_ptr NULL
|
#define gettext_module_ptr NULL
|
||||||
|
Loading…
Reference in New Issue
Block a user