php-i18n Digest 21 Aug 2007 19:22:05 -0000 Issue 367
Topics (messages 1106 through 1116):
Re: Problems with GetText
1106 by: Max_B
1107 by: Daniel Carrera
1108 by: Tomas Kuliavas
1109 by: Max_B
1110 by: Daniel Carrera
1111 by: Daniel Carrera
1112 by: Daniel Carrera
1113 by: Addison Phillips
1114 by: Tomas Kuliavas
$B?75,EPO?$N$*CN$i$;(B
1115 by: nanako
Re: Re-opening of bug #18556
1116 by: Tomas Kuliavas
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Daniel Carrera-2 wrote:
>
> - The 'About us' is not translated.
> - See for yourself: http://theingots.org/test.php
> - I've checked that the .po file is in
> /home/theingot/public_html/locale/es/LC_MESSAGES/messages.po
> - The file is readable and has a translation for 'About us'.
>
The .po is not used by itself, you need to compile it, using msgfmt, into a
.mo
--
View this message in context:
http://www.nabble.com/Problems-with-GetText-tf4260519.html#a12126596
Sent from the Php - Internationalization (i18n) mailing list archive at
Nabble.com.
--- End Message ---
--- Begin Message ---
Max_B wrote:
- The 'About us' is not translated.
- See for yourself: http://theingots.org/test.php
- I've checked that the .po file is in
/home/theingot/public_html/locale/es/LC_MESSAGES/messages.po
- The file is readable and has a translation for 'About us'.
The .po is not used by itself, you need to compile it, using msgfmt, into a
.mo
Thanks. There is a .mo file there as well. Looking at the binary with
'less' I see the Spanish translation of "About us". I don't know how
else I can verify that the .mo file is good.
Cheers,
Daniel.
--- End Message ---
--- Begin Message ---
Daniel Carrera rašė:
> Hello,
>
> I'm having a problem with GetText. I can't figure out why it's not
> translating and I was hoping someone could suggest something I could
> test. I made the following test program:
>
> <?php
> setlocale(LC_ALL, 'es');
> bindtextdomain('messages', '/home/theingot/public_html/locale');
> textdomain('messages');
> echo "English: About us<br/>";
> echo "Spanish: "._('About us');
> echo "<hr/>";
> phpinfo()
> ?>
>
> - phpinfo() says that GetText support is enabled.
> - The 'About us' is not translated.
> - See for yourself: http://theingots.org/test.php
> - I've checked that the .po file is in
> /home/theingot/public_html/locale/es/LC_MESSAGES/messages.po
> - The file is readable and has a translation for 'About us'.
>
>
> In addition, gettext *used* to work before, when we were using a
> different server. I don't know what might have changed on the server
> that would keep gettext from working, given what phpinfo() says.
>
> Can anyone suggest something else I should test to isolate the problem?
>
> Btw: I don't have direct control of the server, but I can ask our web
> host to make changes and often they will.
var_dump(setlocale(LC_ALL, 'es'));
setlocale() call is used only on Linux OS'es and you will need working
system locale (check 'locale -a' output). BSD needs environment
variables. setlocale return values are not correct on OpenBSD.
--
Tomas
--- End Message ---
--- Begin Message ---
Daniel Carrera-2 wrote:
>
> <?php
> setlocale(LC_ALL, 'es');
> bindtextdomain('messages', '/home/theingot/public_html/locale');
> textdomain('messages');
> echo "English: About us<br/>";
> echo "Spanish: "._('About us');
> echo "<hr/>";
> phpinfo()
> ?>
>
Here is a link to
http://coderie.ac-mb.info/english.php?article=phppoll#i18n a page I wrote a
while ago , where there are a few hints about locale.
--
View this message in context:
http://www.nabble.com/Problems-with-GetText-tf4260519.html#a12126933
Sent from the Php - Internationalization (i18n) mailing list archive at
Nabble.com.
--- End Message ---
--- Begin Message ---
Max_B wrote:
Here is a link to
http://coderie.ac-mb.info/english.php?article=phppoll#i18n a page I wrote a
while ago , where there are a few hints about locale.
Thanks. Will take a look.
--- End Message ---
--- Begin Message ---
Daniel Carrera wrote:
Max_B wrote:
Here is a link to
http://coderie.ac-mb.info/english.php?article=phppoll#i18n a page I
wrote a
while ago , where there are a few hints about locale.
Thanks. Will take a look.
Aha! setlocale(LC_ALL, 'es') returns false (and the server is Linux). My
test program:
<?php
$locale = var_export(setlocale(LC_ALL, 'es'), true);
echo "Locale: $locale<br/>";
?>
The output is 'Locale: false'.
What should I say to my web host company? I'm not sure I know enough to
articulate the problem (other than "it doesn't work"). The server is
running Linux. What does the web host have to do to make the locales I
want "available"?
Cheers,
Daniel.
--- End Message ---
--- Begin Message ---
Tomas Kuliavas wrote:
var_dump(setlocale(LC_ALL, 'es'));
setlocale() call is used only on Linux OS'es and you will need working
system locale (check 'locale -a' output). BSD needs environment
variables. setlocale return values are not correct on OpenBSD.
Thanks. The output of that is 'false' and the system is Linux. What
should I say to my web host? What do they need to do?
Thanks a lot for the help. I was really stuck.
--- End Message ---
--- Begin Message ---
You need to have a Spanish locale installed. Running the 'locale -a'
command will tell you what locales are installed. Many server companies
save room by not installing all of the locales. You may also find that
there are Spanish locales such as 'es_ES' or 'es_CO' installed, just not
one called 'es'.
Hope that helps. Regards,
Addison
--
Addison Phillips
Globalization Architect -- Yahoo! Inc.
Chair -- W3C Internationalization Core WG
Internationalization is an architecture.
It is not a feature.
Daniel Carrera wrote:
Tomas Kuliavas wrote:
var_dump(setlocale(LC_ALL, 'es'));
setlocale() call is used only on Linux OS'es and you will need working
system locale (check 'locale -a' output). BSD needs environment
variables. setlocale return values are not correct on OpenBSD.
Thanks. The output of that is 'false' and the system is Linux. What
should I say to my web host? What do they need to do?
Thanks a lot for the help. I was really stuck.
--- End Message ---
--- Begin Message ---
>>> Here is a link to
>>> http://coderie.ac-mb.info/english.php?article=phppoll#i18n a page I
>>> wrote a
>>> while ago , where there are a few hints about locale.
>>
>> Thanks. Will take a look.
>
> Aha! setlocale(LC_ALL, 'es') returns false (and the server is Linux). My
> test program:
>
> <?php
> $locale = var_export(setlocale(LC_ALL, 'es'), true);
> echo "Locale: $locale<br/>";
> ?>
>
> The output is 'Locale: false'.
>
> What should I say to my web host company? I'm not sure I know enough to
> articulate the problem (other than "it doesn't work"). The server is
> running Linux. What does the web host have to do to make the locales I
> want "available"?
Depends on used distribution. On Debian locales are controlled with
'dpkg-reconfigure locales'. If you want the hard way, ask them to run
'localedef -i es_ES -f UTF-8 es_ES.UTF-8' and restart web service. They
will have to rerun same command after every glibc upgrade. You will have
to use 'setlocale(LC_ALL,'es_ES.UTF-8')' in PHP.
Maybe there are other Spanish system locales. If you have PHP 4.3 or
later, run other test script
----
<?php
$aLocales = array('es_ES.UTF-8', 'es_ES.UTF8',
'es_ES.ISO-8859-1', 'es_ES.ISO8859-1',
'es_ES.ISO-8859-15', 'es_ES.ISO8859-15',
'es_ES', '[EMAIL PROTECTED]', 'es');
var_dump(setlocale(LC_ALL,$aLocales));
----
Or use php-gettext classes
(http://savannah.nongnu.org/projects/php-gettext/) instead of gettext
extension.
--
Tomas
--- End Message ---
--- Begin Message ---
割り切った大人の関係だけを求めている大人のコミュニティです。夫には...妻には...内緒でこっそり楽しめます。
まずはサイト内で話してみて相手の感触をつかんでください。好感触であればあとは密会の日時を相談してください。
登録している皆さんには割り切った関係を望んでいるという趣旨を確認済みですので、確実に濃密な関係に結びつきます。
http://melkko.net/?fs26
もちろん登録料や登録システム料などは一切かかりません。
そのほか個人情報の漏洩に関しては一切ない事を固くお約束いたします。
http://melkko.net/?fs26
サイトを見ていただいて、ご利用いただいて確かめていただければ信頼いただけると思っていますので
是非一度ご覧頂ければ幸いです。よろしくお願い致します。
拒否
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
> there are also other reports an this issue. The Problem is the capital
> "I" with the fact that strtolower("I") != "i" in a tr_TR locale. This
> will change with PHP 6's Unicode mode but won't change with PHP 5. As
> work-around use "i" instead of "I" in the names.
Which part breaks if you fix zend_tolower() function? It is already
locale insensitive on Windows.
I've checked PHP5.2 and 6 snapshots compiled with './configure
--prefix=/some/path --with-config-file-path=/some/path'
'make test' does not show new issues.
In PHP6-200708151230 fixed interpreter lost 3% of performance in 'make
test' and 6% in Zend/bench.php tests. Fixed PHP5.2-200708211630 and
PHP6-200708211630 are even a bit faster on 'make test' and Zend/bench.php.
--
Tomas
--- End Message ---