php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29831 gettext missing from windows build
Submitted: 2004-08-25 09:58 UTC Modified: 2004-08-30 08:24 UTC
From: tedf at ndrw dot co dot uk Assigned: edink (profile)
Status: Closed Package: Gettext related
PHP Version: 4.3.8 OS: Windows NT
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
8 - 2 = ?
Subscribe to this entry?

 
 [2004-08-25 09:58 UTC] tedf at ndrw dot co dot uk
Description:
------------
It seems that this function requires the gettext module, I assume this is php-gettext.dll this is not shipped with 4.3.8. My test code work OK on Linux fails on Windows. Any suggestions? I am using 4.3.8 becasue it is the same version as My ISP is using.

There is fix in bug report #18693 but the download link is bad

Reproduce code:
---------------
<?php
// Set language to German
setlocale(LC_ALL, 'de_DE');

// Specify location of translation tables
bindtextdomain("myPHPApp", "./locale");

// Choose domain
textdomain("myPHPApp");

// Translation is looking for in ./locale/de_DE/LC_MESSAGES/myPHPApp.mo now

// Print a test message
echo gettext("Welcome to My PHP Application");

// Or use the alias _() for gettext()
echo _("Have a nice day");
?> 

Expected result:
----------------
Dsiplay some text

Actual result:
--------------
Fatal error: Call to undefined function: bindtextdomain() in F:\Inetpub\wwwroot\test\bind.php on line 6

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-30 08:24 UTC] edink@php.net
You can use 4.3.9RC1 until 4.3.9 final is released.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC