Re: [PHP] gettext does not translate

2004-09-11 Thread Christian David
Yann LarrivÃe wrote:

> Did you restart apache after creating your mo file ?
You are right, thank you.
But there where another mistake, too. My system doesn't like "de_DE", it
wants to have "[EMAIL PROTECTED]".

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] gettext does not translate

2004-09-11 Thread Yann Larrivée
Did you restart apache after creating your mo file ?

Look at the first comment on http://ca3.php.net/gettext
You might be facing this issue.

Yann



On September 11, 2004 10:08, Christian David wrote:
> Hello!
>
> I wrote this skript, but gettext returns only the english string.
>
> I could not find a bug at bugs.php.net, so I think I forgot something.
> I have Debian Linux, PHP Version 4.3.4 and Gettext 0.14.1 (PHP and Gettext
> as debian pakages)
>
> gettext.php in /var/www/gymbay/
>
>  // Set language to German
>  setlocale(LC_ALL, 'de_DE');
>
>  // Specify location of translation tables
>  bindtextdomain("messages", "i18n");
>
>  // Choose domain
>  textdomain("messages");
>
>  // Translation is (should) looking for in
> i18n/de_DE/LC_MESSAGES/messages.mo now
>
>  // Print a test message
>  echo gettext("Welcome to My PHP Application");
>
>  // Or use the alias _() for gettext()
>  echo _("Have a nice day");
>
> // Output:
> // Welcome to My PHP ApplicationHave a nice day
>
> ?>
>
> messages.po
>
> # translation of messages.po to german
> # This file is distributed under the same license as the PACKAGE package.
> # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
> # Christian DÃvid <[EMAIL PROTECTED]>, 2004.
> #
> msgid ""
> msgstr ""
> "Project-Id-Version: messages\n"
> "Report-Msgid-Bugs-To: \n"
> "POT-Creation-Date: 2004-09-11 15:50+0200\n"
> "PO-Revision-Date: 2004-09-11 15:52+0200\n"
> "Last-Translator: Christian DÃvid <[EMAIL PROTECTED]>\n"
> "Language-Team: \n"
> "MIME-Version: 1.0\n"
> "Content-Type: text/plain; charset=UTF-8\n"
> "Content-Transfer-Encoding: 8bit\n"
> "X-Generator: KBabel 1.3.1\n"
> "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
>
> #: gettext.php:15
> msgid "Welcome to My PHP Application"
> msgstr "Willkommen zu meiner PHP Anwendung"
>
> #: gettext.php:18
> msgid "Have a nice day"
> msgstr "Wir wÃnschen Ihnen einen schÃnen Tag"
>
> and the "messages.mo" is in /var/www/gymbay/i18n/de_DE/LC_MESSAGES/
>
> Thank you!


pgpGBFzO1baec.pgp
Description: signature


[PHP] gettext does not translate

2004-09-11 Thread Christian David
Hello!

I wrote this skript, but gettext returns only the english string.

I could not find a bug at bugs.php.net, so I think I forgot something.
I have Debian Linux, PHP Version 4.3.4 and Gettext 0.14.1 (PHP and Gettext
as debian pakages)

gettext.php in /var/www/gymbay/



messages.po

# translation of messages.po to german
# This file is distributed under the same license as the PACKAGE package.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
# Christian DÃvid <[EMAIL PROTECTED]>, 2004.
#
msgid ""
msgstr ""
"Project-Id-Version: messages\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-09-11 15:50+0200\n"
"PO-Revision-Date: 2004-09-11 15:52+0200\n"
"Last-Translator: Christian DÃvid <[EMAIL PROTECTED]>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.3.1\n"
"Plural-Forms:  nplurals=2; plural=(n != 1);\n"

#: gettext.php:15
msgid "Welcome to My PHP Application"
msgstr "Willkommen zu meiner PHP Anwendung"

#: gettext.php:18
msgid "Have a nice day"
msgstr "Wir wÃnschen Ihnen einen schÃnen Tag"

and the "messages.mo" is in /var/www/gymbay/i18n/de_DE/LC_MESSAGES/

Thank you!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php