You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brian McCallister <mc...@forthillcompany.com> on 2003/12/29 18:55:12 UTC

i18n and Submit Buttons

I am using FlowScript + Woody + i18n transformer and cannot figure out 
how to internationalize submit button labels as it is an attribute on 
the submit element in the template:

<html
     xmlns:wt="http://apache.org/cocoon/woody/template/1.0"
     xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"
     xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
     <head>
         <title><i18n:text>SetAwayMessage.title</i18n:text></title>
     </head>
     <body>
         <h1><i18n:text>SetAwayMessage.title</i18n:text></h1>
         <wt:form-template action="#{$continuation/id}.continue" 
method="POST">
             <input type="submit" value="How Do I i18n This?"/>
             <br />
             <i18n:text><wt:widget-label id="subject"/></i18n:text>
             <wt:widget id="subject"/>
             <br />
             <i18n:text><wt:widget-label id="body"/></i18n:text>
             <wt:widget id="body">
                 <wi:styling type="textarea" cols="50" rows="10"/>
             </wt:widget>
         </wt:form-template>
     </body>
</html>

Any pointers?

-Brian



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: i18n and Submit Buttons

Posted by Brian McCallister <mc...@forthillcompany.com>.
Ah, much appreciated!

-Brian

On Dec 29, 2003, at 1:48 PM, Stephan Coboos wrote:

> You must transform your doc with i18n before woody transforms it. In 
> this case you can do this:
>
> <input type="submit" value="How Do I i18n This?" i18n:attr="value"/>
>
> And the value of "value" is the key in the message catalogoue, like:
>
> ...
> <message key="How Do I i18n This?">Translated value</message>
> ...
>
> Regards
> Stephan
>
> Brian McCallister wrote:
>
>> I am using FlowScript + Woody + i18n transformer and cannot figure 
>> out how to internationalize submit button labels as it is an 
>> attribute on the submit element in the template:
>>
>> <html
>>     xmlns:wt="http://apache.org/cocoon/woody/template/1.0"
>>     xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"
>>     xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
>>     <head>
>>         <title><i18n:text>SetAwayMessage.title</i18n:text></title>
>>     </head>
>>     <body>
>>         <h1><i18n:text>SetAwayMessage.title</i18n:text></h1>
>>         <wt:form-template action="#{$continuation/id}.continue" 
>> method="POST">
>>             <input type="submit" value="How Do I i18n This?"/>
>>             <br />
>>             <i18n:text><wt:widget-label id="subject"/></i18n:text>
>>             <wt:widget id="subject"/>
>>             <br />
>>             <i18n:text><wt:widget-label id="body"/></i18n:text>
>>             <wt:widget id="body">
>>                 <wi:styling type="textarea" cols="50" rows="10"/>
>>             </wt:widget>
>>         </wt:form-template>
>>     </body>
>> </html>
>>
>> Any pointers?
>>
>> -Brian
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: i18n and Submit Buttons

Posted by Stephan Coboos <cr...@gmx.net>.
You must transform your doc with i18n before woody transforms it. In 
this case you can do this:

<input type="submit" value="How Do I i18n This?" i18n:attr="value"/>

And the value of "value" is the key in the message catalogoue, like:

...
<message key="How Do I i18n This?">Translated value</message>
...

Regards
Stephan

Brian McCallister wrote:

> I am using FlowScript + Woody + i18n transformer and cannot figure out 
> how to internationalize submit button labels as it is an attribute on 
> the submit element in the template:
>
> <html
>     xmlns:wt="http://apache.org/cocoon/woody/template/1.0"
>     xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"
>     xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
>     <head>
>         <title><i18n:text>SetAwayMessage.title</i18n:text></title>
>     </head>
>     <body>
>         <h1><i18n:text>SetAwayMessage.title</i18n:text></h1>
>         <wt:form-template action="#{$continuation/id}.continue" 
> method="POST">
>             <input type="submit" value="How Do I i18n This?"/>
>             <br />
>             <i18n:text><wt:widget-label id="subject"/></i18n:text>
>             <wt:widget id="subject"/>
>             <br />
>             <i18n:text><wt:widget-label id="body"/></i18n:text>
>             <wt:widget id="body">
>                 <wi:styling type="textarea" cols="50" rows="10"/>
>             </wt:widget>
>         </wt:form-template>
>     </body>
> </html>
>
> Any pointers?
>
> -Brian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org