php-i18n Digest 28 Feb 2003 11:28:25 -0000 Issue 155
Topics (messages 466 through 470):
Re: can't figure out how to solve this ...
466 by: Gary Ross
468 by: Robert Masse
Re: can't figure out how to solve this ...[oops]
467 by: Gary Ross
Chasen Questions
469 by: Gary Ross
detecting katakana vs hiragana
470 by: Simon Dedeyne
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 ---
Without a web-server? Basically, your browser runs locally the browser
itself and any plugins for obvious security reasons. Javascript works
internally (as such). Once again imagine a Javascript that could run
any stuff on the local machine - a security disaster. I can't see how
you can do what you're asking, but there is a little trick that you can
use if you want to run php or whatever within a static page. Use the
<img> tag.
<img src = "do_something.php" lowsrc = "/shim.gif">
Gary
On Tuesday, February 25, 2003, at 11:02 pm, Robert Masse wrote:
Hello you all,
I have a problem using gettext with PHP 4.3.1 :
If I put :
putenv("LANG=en_CA");
$setloc = setlocale(LC_ALL, "");
the value of $setloc shows me that the LC_xxx variables have been set
to
en_CA, *excepted* for the following ones :
LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;LC_TIME=fr_FR;LC_COLLATE=fr_FR;LC_MONET
ARY=f
r_FR;LC_MESSAGES=fr_FR
I suppose this is because those ones are defined on the server.
It means that gettext will look in ./locale/fr_FR/LC_MESSAGES to find
the
translation file and, of course, it means that no matter which
language I
choose, it will *always* use the same file.
I tried using setlocale(LC_MESSAGES, en_CA) which seems to work (return
value = "en_CA") but, anyhow, gettext still uses the same fr_FR value
to
find the translation file.
If I try to change the LC_MESSAGES value by hand in the shell, the
value is
changed but has no effect on my script results.
If I do not put setlocale(), gettext never translates anything even
with
LANG set to something.
In short : if I use setlocale(), the system ALWAYS use fr_FR and if I
do not
use setlocale() it doesn't translate at all ...
Could someone help me ?
Robert Masse
--
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Thanks Gary but I found out the solution ...
The most important setting for gettext to look the file is the LANGUAGE
value, then LC_ALL, LC_MESSAGES and LANG. And as LANGUAGE was defined on the
server and I didn't touched it before : it was always looking for fr_FR ...
Now, it works fine.
Thanks for your help,
Robert
"Gary Ross" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Without a web-server? Basically, your browser runs locally the browser
> itself and any plugins for obvious security reasons. Javascript works
> internally (as such). Once again imagine a Javascript that could run
> any stuff on the local machine - a security disaster. I can't see how
> you can do what you're asking, but there is a little trick that you can
> use if you want to run php or whatever within a static page. Use the
> <img> tag.
> <img src = "do_something.php" lowsrc = "/shim.gif">
>
> Gary
>
>
> On Tuesday, February 25, 2003, at 11:02 pm, Robert Masse wrote:
>
> > Hello you all,
> >
> > I have a problem using gettext with PHP 4.3.1 :
> >
> > If I put :
> >
> > putenv("LANG=en_CA");
> > $setloc = setlocale(LC_ALL, "");
> >
> > the value of $setloc shows me that the LC_xxx variables have been set
> > to
> > en_CA, *excepted* for the following ones :
> > LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;LC_TIME=fr_FR;LC_COLLATE=fr_FR;LC_MONET
> > ARY=f
> > r_FR;LC_MESSAGES=fr_FR
> > I suppose this is because those ones are defined on the server.
> >
> > It means that gettext will look in ./locale/fr_FR/LC_MESSAGES to find
> > the
> > translation file and, of course, it means that no matter which
> > language I
> > choose, it will *always* use the same file.
> >
> > I tried using setlocale(LC_MESSAGES, en_CA) which seems to work (return
> > value = "en_CA") but, anyhow, gettext still uses the same fr_FR value
> > to
> > find the translation file.
> >
> > If I try to change the LC_MESSAGES value by hand in the shell, the
> > value is
> > changed but has no effect on my script results.
> > If I do not put setlocale(), gettext never translates anything even
> > with
> > LANG set to something.
> >
> > In short : if I use setlocale(), the system ALWAYS use fr_FR and if I
> > do not
> > use setlocale() it doesn't translate at all ...
> >
> > Could someone help me ?
> >
> > Robert Masse
> >
> >
> >
> > --
> > PHP Internationalization Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
--- End Message ---
--- Begin Message ---
Somehow got lists mixed up [duh!]. Ignore that last one.
Gary
On Tuesday, February 25, 2003, at 11:02 pm, Robert Masse wrote:
Hello you all,
I have a problem using gettext with PHP 4.3.1 :
If I put :
putenv("LANG=en_CA");
$setloc = setlocale(LC_ALL, "");
the value of $setloc shows me that the LC_xxx variables have been set
to
en_CA, *excepted* for the following ones :
LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;LC_TIME=fr_FR;LC_COLLATE=fr_FR;LC_MONET
ARY=f
r_FR;LC_MESSAGES=fr_FR
I suppose this is because those ones are defined on the server.
It means that gettext will look in ./locale/fr_FR/LC_MESSAGES to find
the
translation file and, of course, it means that no matter which
language I
choose, it will *always* use the same file.
I tried using setlocale(LC_MESSAGES, en_CA) which seems to work (return
value = "en_CA") but, anyhow, gettext still uses the same fr_FR value
to
find the translation file.
If I try to change the LC_MESSAGES value by hand in the shell, the
value is
changed but has no effect on my script results.
If I do not put setlocale(), gettext never translates anything even
with
LANG set to something.
In short : if I use setlocale(), the system ALWAYS use fr_FR and if I
do not
use setlocale() it doesn't translate at all ...
Could someone help me ?
Robert Masse
--
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have chasen working fine as of 2.3.0 (with darts 0.1 installed)
1.
It works fine with the
SUFDIC and PATDIC
but I get this error if I try to use DADIC
;(PATDIC chadic)
(DADIC chadic)
;(SUFDIC chadic)
chasen: /usr/local/share/chasen/dic/ipadic/chadic.lex: No such file or
directory.
I couldn't find any information regarding how to actually install
chadic.lex
2. Which is better to use SUFDIC or PATDIC?
Speed is not really an issue as I'm on an extremely fast dedicated
server.
I don't really understand the differences.
3. How do I add works to the dictionary in a *nix environment?
The faq on the home page has this question then a blank space !
Many thanks for any help here.
Gary
--- End Message ---
--- Begin Message ---
Hi,
Is there a way/function for detecting if a word is in katakana or
hiragana?
I'm using UTF-8 encoding.
I don't know if it's of any help, but I wonder if a solution could be
find through a regular expression option, like indicated (though not
explained) here http://regex.info/indexlist.html
Tnx,
Simon
--- End Message ---