NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
gettext extension install problem *solved*


Joined: 19 Jan 2004
Posts: 5
Reply with quote
I can get the local webserver to load the amended php.ini settings for gettext extension correctly, however when I use the Techplatform as the remote server(and change the php.ini file and path accordingly to suit) I get an error telling me that apache failed to start because the module could not be found. Path...../techPlat/apache/php/extensions\php_gettext.dll
I have checked the directory and the module is there.

Any suggestions as to why it cannot find the gettext.dll?
View user's profileFind all posts by barnbusterSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I'd recommend you to copy libintl-1.dll into Apache's directory.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Jan 2004
Posts: 5
Reply with quote
Have copied it over but the result is still the same. Is this a fault with apache or php, can I substitute the phped local version of php 4.4.1 into apache(currently version 4.4)?
View user's profileFind all posts by barnbusterSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
sorry, I messed with TechPlatform v5 that's still not released.
With v4 that's on the site you have to copy iconv.dll
It is located in
E:\Program Files\nusphere\TechPlat\apache\php\
and should be copied to
E:\Program Files\nusphere\TechPlat\apache\

Alternatively you may want to include E:\Program Files\nusphere\TechPlat\apache\php into the PATH environment variable and reboot your machine.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Jan 2004
Posts: 5
Reply with quote
Sorted thanks.

Having issues and trouble understanding how Gettext and php's gettext(); interact.

Does php's gettext(); rely on GNU GetText to execute or are they separate entities?

Can I setup dummy locale and language .mo and .po files to test the gettext(); function works correctly? Have tried already but appears to be failing gracefully, ie just outputs the enclosed message text and not the translation from message file.

Cannot get GetText to execute xgettext to the correct path on a windows shell, do you know of any compatibility issues here?
View user's profileFind all posts by barnbusterSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I think the excerpt below taken from http://www.php.net/gettext relates to the problem you encountered

Quote:
mikolaj at webgate dot bg
10-Jun-2004 03:54
winXP, PHP 4.3.5 as Apache1.3.29 module

Two hints for Windows users.

I found setting locale is neither sufficient nor nessecery. To get it work I needed to set either LC_ALL or LANG enviroment variable to my locale. Anyway this value must be proper for setlocale so it is good to test with it. In my case it was bgr_BGR for bulgarian according to http://www.unicode.org/onlinedat/countries.html

gettext checks for files once and keeps them in cashe. Especially it means that if it doesn't find your files it won't search again, so restart Apache after any directory changes!!

My minimal working script:
<?php
// translation file: D:\Apache\htdocs\mypage\locale\bgr_BGR\LC_MESSAGES\messages.mo
putenv("LC_ALL=bgr_BGR");
bindtextdomain('messages', 'D:\Apache\htdocs\mypage\locale\\');
echo gettext("Hello");
?>
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Jan 2004
Posts: 5
Reply with quote
I have reconfigured my php.ini to enable gettext(); and have used GNU GetText to create my .po and .mo files.

I have all the message.po and .mo files appropriately structured and set my paths and lang variables to test gettext();, however without success.

I think that i have a php configuring problem.

What I want to know is:

Will the install of the gettext.dll allow use of the translation files .mo alone?

I.E. Does PHP provide the translating functionality independantly by calling the translation from the .mo files? or does PHP have to be configured to use GNU GetText functions directly to call the translation from the .mo. I read that the former was possible.
View user's profileFind all posts by barnbusterSend private message


Joined: 19 Jan 2004
Posts: 5
Reply with quote
Having now worked on another linux based server and succeeded with gettext(); I have discovered that the techplatform php dlls or GetText extension dlls are either not configured correctly or incompatable.

What I need are the correct GetText dll extensions, paths and how to set them for the Techplatform on Windows XP.

Thanks
View user's profileFind all posts by barnbusterSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I helped you with getting php_gettext loaded and used by php.
All questions on the beneath functionality could be considered with php_gettext authors. Please contact them for their help or submit bug to http://bugs.php.net/

gettext.c:
Code:
 Author: Alex Plotnick <alex at wgate dot com>             
View user's profileFind all posts by dmitriSend private messageVisit poster's website
gettext extension install problem *solved*
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic