Forum Moderators: coopster

Message Too Old, No Replies

Using Poedit with XAMPP

         

tunafish

10:46 pm on Sep 16, 2010 (gmt 0)

10+ Year Member



I am struggling for days now to get into translation files with PHP's gettext() function and creating the files with Poedit. Poedit didn't come with a helpfile either and I tried lots of things found online but nothing works.. I am on Mac OSX with an XAMPP configuration. I think the problem has to be filepath in the catalog settings. I tried all possible paths but can't seem to parse the gettext functions.

on OSX Poedit resides in
/Applications/
my XAMPP dir is
/Applications/XAMPP/xamppfiles/htdocs/

inside this dir I created gettext.php with

<?php echo _("Hello World"); echo gettext("Goodmorning"); ?>

and the following folders:

/locale/
/locale/it_IT/LC_MESSAGES/

With Poedit when I do > File > New Catalog

Language: Italian
Country: Italy
Charset: UTF-8
Source code charset: UTF-8
Base path: /Applications/XAMPP/xamppfiles/htdocs/

Than I save default.po to /locale/it_IT/LC_MESSAGES/

"Updating the catalog failed. Click on 'More>>' for details

13:04:10: Poedit did not find any files in scanned directories.
13:04:11: Entries in the catalog are probably incorrect.
13:04:11: Updating the catalog failed. Click on 'More>>' for details.

JAB Creations

3:03 pm on Sep 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use XAMPP though I've never worked with Poedit however I have a couple suggestions for you...

1.) You did restart Apache after enabling Poedit right? I've forgotten to do that with certain modules. ;)

2.) Did you check Apache's error log? Error messages can really help if of course they are triggered.

- John