You are not logged in.

#1 2010-08-14 10:32:47

barii
Member
Registered: 2009-04-09
Posts: 21

php-gettext

There isn't php-gettext package in any repo or AUR
but there is a line in php.ini:
extension=gettext.so
(apache restarted)

phpinfo looks like this:

Configure Command:    ....'--with-gettext=shared' ....
...
gettext
GetText Support    enabled
...

Here is the code

<?php
    bindtextdomain('messages', './');
    textdomain('messages');
    switch ($_GET['l']) {
        case 'es':
        setlocale(LC_ALL,'es_ES');
        break;
        case 'en':
        default:
        setlocale(LC_ALL,'en_GB');
        break;
    }
    echo _('Hello World');
?>

It works on ubuntu, but not in archlinux.

Have you any idea to solve my problem?
thanks

Last edited by barii (2010-08-14 10:34:12)

Offline

#2 2010-08-14 16:37:31

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: php-gettext

How does it not work?  Here I get "Hello World" printed; haven't tried with a translation though.

Offline

Board footer

Powered by FluxBB