#32201 [Opn->Ver]: gettext: Unexpected output from textdomain()

From: Date: Sun, 06 Mar 2005 14:40:30 +0000
Subject: #32201 [Opn->Ver]: gettext: Unexpected output from textdomain()
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969366857@lists.php.net to get a copy of this message
ID: 32201 Updated by: sniper@php.net -Summary: Unexpected output from textdomain() Reported By: php at fimbul dot net -Status: Open +Status: Verified -Bug Type: Gettext related +Bug Type: Documentation problem Operating System: Linux (Debian unstable) PHP Version: 4.3.10 New Comment: From the GNU gettext manpage: "If successful, the textdomain function returns the current message domain, after possibly changing it." As the PHP function is merely a wrapper to this gettext function, this is a documentation problem. Reclassified as such. Previous Comments: ------------------------------------------------------------------------ [2005-03-06 02:58:50] php at fimbul dot net Description: ------------ From the documentation: string textdomain ( string text_domain ) This function sets the domain to search within when calls are made to gettext(), usually the named after an application. The previous default domain is returned. Call it with NULL as parameter to get the current setting without changing it. What actually happens: This function sets the domain to search within when calls are made to gettext(), usually the named after an application. The current default domain is returned, i.e. the domain just set. Call it with NULL as parameter to get the current setting without changing it. Reproduce code: --------------- <?php // Let's assume that the current default domain is 'A' echo textdomain(NULL); echo $orig = textdomain('B'); echo textdomain(NULL); echo textdomain('C'); echo textdomain(NULL); echo textdomain($orig); echo textdomain(NULL); ?> Expected result: ---------------- AABBCCA Actual result: -------------- ABBCCBB ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32201&edit=1

« previous php.doc (#969366857) next »