You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Philippe Guillard <pg...@soociety.com> on 2004/02/11 12:28:09 UTC
Sendmail logicsheet & internationalization
Hi,
I've got a problem to internationalize my sendmail :
I use a Woody form, then XSP logicsheet as in the sendmail sample, where
i get the values entered by woody and add some text that i need to be
internationalized to compose the body of the mail. I can't use i18n
transformer as the mail seems to be sent during the XSP generation.
Then i planned to do some logic with if statements on the locale. Below
is what i plan to do but i can't get the locale value...I'm thinking
also about doing this in flow.
Any suggestion or method is welcomed !
Phil
----------------------------------------------------------
<xsp:logic>
// (THIS IS NOT CORRECT) getLocale(locale);
if (locale = "en_US") {
String bodymessage = "Message.in any language";
}
}
else {
String bodymessage = "Message in English";
}
</xsp:logic>
<sendmail:send-mail>
........
<sendmail:body><xsp:expr>bodymessage</xsp:expr><xsp-request:get-parameter name="This_coming_from_woody template"/></sendmail:body>
........
</sendmail:send-mail>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Sendmail logicsheet & internationalization
Posted by Eduard Drenth <ed...@tiscali.nl>.
On Wed, 2004-02-11 at 12:28, Philippe Guillard wrote:
> Hi,
> I've got a problem to internationalize my sendmail :
>
> I use a Woody form, then XSP logicsheet as in the sendmail sample, where
> i get the values entered by woody and add some text that i need to be
> internationalized to compose the body of the mail. I can't use i18n
> transformer as the mail seems to be sent during the XSP generation.
>
Yes I think that you are right there. Consider using a mail transformer,
I have build one that works nicely with different encodings, also there
is a mailtransformer in 2.1.3.
> Then i planned to do some logic with if statements on the locale. Below
> is what i plan to do but i can't get the locale value...I'm thinking
> also about doing this in flow.
>
> Any suggestion or method is welcomed !
>
> Phil
>
> ----------------------------------------------------------
>
> <xsp:logic>
> // (THIS IS NOT CORRECT) getLocale(locale);
> if (locale = "en_US") {
> String bodymessage = "Message.in any language";
> }
> }
> else {
> String bodymessage = "Message in English";
> }
>
> </xsp:logic>
>
> <sendmail:send-mail>
> ........
> <sendmail:body><xsp:expr>bodymessage</xsp:expr><xsp-request:get-parameter name="This_coming_from_woody template"/></sendmail:body>
> ........
> </sendmail:send-mail>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
--
Eduard Drenth <ed...@tiscali.nl>
home sweet home
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org