FAQ
Hi,

I need to send email in two different languages

app.eo:
-------
...
my $lang = $fdat->{lang} || $r->app->udat->{lang} || 'en' ;
my %messages = %{ do '/home/www/nbcz/etc/dict/dict.dump' };
...

html:
-----
...
$udat{lang}= 'cz';
Execute({ inputfile => 'email.eo', mtime => undef, to => 'email1' });
$udat{lang}= 'en';
Execute({ inputfile => 'email.eo', mtime => undef, to => 'email2' });
...
(email.eo has a lot of [= stuff =])

If language is set in init sub, I think one cannot change current
language in the middle of page - is there any workaround?

Thanks

- Robert

PS I'd take notebook on holiday ( :-( ), but I'm too lazy to install
Linux - what is status of Emperl2 on Windows? I don't care for
multithreading etc, one-page-at-a-time is good enough for development -
so does it work at all? Can I download PPM somewhere?






---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org

Search Discussions

  • Gerald Richter at Jul 7, 2005 at 7:35 pm

    You can change the message hash inside the page:

    ...
    $udat{lang}= 'cz';
    $epreq -> messages ([\%cz_msgs]) ;
    Execute({ inputfile => 'email.eo', mtime => undef, to =>
    'email1' });
    $epreq -> messages ([\%en_msgs]) ;
    $udat{lang}= 'en';
    Execute({ inputfile => 'email.eo', mtime => undef, to =>
    'email2' }); ...
    It might also work to pass the messages parameter to Execute, but I didn't
    tried this yet
    (email.eo has a lot of [= stuff =])

    If language is set in init sub, I think one cannot change
    current language in the middle of page - is there any workaround?

    Thanks

    - Robert

    PS I'd take notebook on holiday ( :-( ), but I'm too lazy to
    install Linux - what is status of Emperl2 on Windows? I don't
    care for multithreading etc, one-page-at-a-time is good
    enough for development - so does it work at all? Can I
    download PPM somewhere?
    Embperl 2.0 works with Apache 1.3, but with Apache 2.0 it does not even
    compile :-(

    Seen Install.pod for where to get the ppm for Apache 1.3

    Gerald





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • RobertCZ at Jul 8, 2005 at 7:30 am

    Gerald Richter wrote:
    You can change the message hash inside the page:

    ...
    $udat{lang}= 'cz';
    $epreq -> messages ([\%cz_msgs]) ;
    Thanks - this works. I can leave for holiday knowing last problem is
    fixed - YAY! ;-)


    PS I'd take notebook on holiday ( :-( ), but I'm too lazy to
    install Linux - what is status of Emperl2 on Windows? I don't
    care for multithreading etc, one-page-at-a-time is good
    enough for development - so does it work at all? Can I
    download PPM somewhere?
    Embperl 2.0 works with Apache 1.3, but with Apache 2.0 it does not even
    compile :-(

    Seen Install.pod for where to get the ppm for Apache 1.3
    Hmm - I'm not sure what change from 2.0 to 1.3 would look like - I got a
    lot of [= =] etc. Thanks anyway.
  • Gerald Richter at Jul 8, 2005 at 9:58 am

    Embperl 2.0 works with Apache 1.3, but with Apache 2.0
    it does not even
    compile :-(

    Seen Install.pod for where to get the ppm for Apache 1.3


    Hmm - I'm not sure what change from 2.0 to 1.3 would look
    like - I got a lot of [= =] etc. Thanks anyway.
    Inside Embperl you need not to change anything. Embperl 2.0 gives you the
    same interface and fucntions on Apache 1.3 and on Apache 2.0. Only if you
    are using mod_perl methods directly you might need to change something, they
    are different.

    Gerald


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • RobertCZ at Jul 8, 2005 at 11:00 am

    Gerald Richter wrote:

    Hmm - I'm not sure what change from 2.0 to 1.3 would look
    like - I got a lot of [= =] etc. Thanks anyway.
    Inside Embperl you need not to change anything. Embperl 2.0 gives you the
    same interface and fucntions on Apache 1.3 and on Apache 2.0. Only if you
    are using mod_perl methods directly you might need to change something, they
    are different.
    Really? What would EP 1.3 say to [= thing =]? I don't have one around to
    test it... And I use heavily EO incl. $epreq-> call... But I'm going to
    try it, it's still easier then install complete gentoo...

    - R.
  • Gerald Richter at Jul 8, 2005 at 12:16 pm


    Inside Embperl you need not to change anything. Embperl
    2.0 gives you the
    same interface and fucntions on Apache 1.3 and on
    Apache 2.0. Only if you
    are using mod_perl methods directly you might need to
    change something, they
    are different.



    Really? What would EP 1.3 say to [= thing =]? I don't have
    one around to test it... And I use heavily EO incl. $epreq->
    call... But I'm going to try it, it's still easier then
    install complete gentoo...
    Embperl 1.3 will not like it, but what I said was that Embperl 2.0 on
    Apache 1.3 and mod_perl 1.x works on Windows.

    So please install

    - Apache 1.3
    - mod_perl 1.x
    - Embperl 2.0

    This combination will work on Windows

    Gerald


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • RobertCZ at Jul 8, 2005 at 1:42 pm

    Gerald Richter wrote:
    Embperl 1.3 will not like it, but what I said was that Embperl 2.0 on
    Apache 1.3 and mod_perl 1.x works on Windows.

    So please install

    - Apache 1.3
    - mod_perl 1.x
    - Embperl 2.0

    This combination will work on Windows
    Aha, I see. I've just tried to install stuff according to Install.pod
    but mod_per doesn't work (cannot remove module mod_perl.c: not found in
    module list) - I'm going to try Randy everything-in-one-file, it used to
    work for me and it seems to contain Embperl2 too

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • Ed Grimm at Jul 8, 2005 at 4:03 pm

    On Fri, 8 Jul 2005, RobertCZ wrote:
    Gerald Richter wrote:
    Hmm - I'm not sure what change from 2.0 to 1.3 would look
    like - I got a lot of [= =] etc. Thanks anyway.
    Inside Embperl you need not to change anything. Embperl 2.0 gives you the
    same interface and fucntions on Apache 1.3 and on Apache 2.0. Only if you
    are using mod_perl methods directly you might need to change something, they
    are different.
    Really? What would EP 1.3 say to [= thing =]? I don't have one around to
    test it... And I use heavily EO incl. $epreq-> call... But I'm going to
    try it, it's still easier then install complete gentoo...
    I don't think you're understanding what Gerald is saying. Embperl 2.0,
    but Apache 1.3. Since it's Embperl 2.0 in both cases, the Embperl
    structures do not need to change. Only the Apache version is different.

    Ed

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • Ed Grimm at Jul 8, 2005 at 4:18 pm
    That's what I get for selecting all messages with that same subject,
    without removing the leading re:... Sorry for the noise.

    Ed

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedJul 7, '05 at 10:56a
activeJul 8, '05 at 4:18p
posts9
users3
websiteperl.apache.org

People

Translate

site design / logo © 2022 Grokbase