Hi,

when you have the translations in a resource bundle, as you have now
with your package.properties, you cannot simply get the translations
from the stack, but have to invoke the getText method from you
TextProvider.

The TextProvider interface usually is implemented by your action as
soon as you extend ActionSupport. If it doesn't yet, you'll have to
change this, or place a text provider on the stack yourself.

Then just use an expression like %{getText(displayName)}.

Bye,
-Ralf

On Thu, Jun 5, 2008 at 10:56 AM, Matthieu MARC
<[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I'm trying to play with internationalization but I have a small problem.
> Here is my code :
>
> <s:iterator value="week.semaine">
>
>       <s:label labelposition="top" value="%{displayName}" />
>
>       <s:select name="week.semaine[%{index}].am" onchange="countHour();"
> id="am%{index}" key="timetable.morning" list="heures" value="%{am}" />
>
>       <s:select name="week.semaine[%{index}].pm" onchange="countHour();"
> id="pm%{index}" key="timetable.afternoon" list="heures" value="%{pm}" />
>
> </s:iterator>
>
>
> My problem is in the label. %{displayName} return monday, tuesday,
> wednesday.... and I want to translate the label value.
>
> I tried :
>
>
> key="%{displayName}"
>
> key="timetable.%{displayName}"
>
>
> I wrote a package.properties file :
>
> timetable.monday=lundi
>
> monday=lundi
>
>
> But nothing is working.
>
> Is someone have an idea to help me ?
>
> thank in advance.
>
> Matthieu MARC
>
> --
> Matthieu MARC
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to