You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by manoj sinha <ma...@yahoo.com> on 2007/02/07 17:58:27 UTC

Wanna Solution on Internationalization!!!!

Hi,
Expecting solution:i m writing Login Form with Internationlization support.But as i  Select Language  it doesn't reflect in Form Field.Pls Suggest ASAP
<s:form action="Login">
    <s:combobox  name="language" list="{'English','French','Italian'}"
   value="English" ></s:combobox>
  <s:textfield label="%{getText('loginlang.loginid')}" name="username"/>
  
  <s:password label="%{getText('loginlang.password')}" name="password" />
  
  <ul>
    <li>
            
  <s:submit/><s:reset/>
</s:form>

<s:url id="en" action="Login">
            <s:param name="request_locale" >en</s:param>
        <s:property value="getText('loginlang.language')"/>
        <s:property value="getText('longinlang.loginid')"/> 
        <s:property value="getText('longinlang.password')"/>
        </s:url>
               
        
        </li>
        <li>
        <s:url id="fr" action="Login">
            <s:param name="request_locale">fr</s:param>
                 <s:property value="getText('loginlang.language')"/>
        <s:property value="getText('longinlang.loginid')"/> 
        <s:property value="getText('longinlang.password')"/>
        </s:url>
        
                
        </li>
    <li>
              <s:url id="it"action="Login">
        <s:param name="request_locale">it</s:param>
        <s:property value="getText('loginlang.language')"/>
        <s:property value="getText('longinlang.loginid')"/> 
        <s:property value="getText('longinlang.password')"/>
           
            </s:url>
            
        </li>
          
  
</ul>


 
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.

Re: Wanna Solution on Internationalization!!!!

Posted by manoj sinha <ma...@yahoo.com>.
Ted,
Appreciate your suggestion.
But on selection of language Options,It is not reflecting in Label fields.Obliged to receive early response.Refined Codes:
<s:form action="Login">
    <s:i18n name="/package path....../">
    <s:combobox label="%{getText('language')}" name="language" list="{'English','French','Italian'}"
  value="English"  ></s:combobox>
      
  <s:textfield label="%{getText('username')}" name="username"/>
  <s:password label="%{getText('password')}" name="password"/>
  
      </s:i18n>
<s:submit/>
<s:reset></s:reset>
</s:form>
<ul>
    <li>        
            <s:param name="request_locale" >en</s:param>
            <s:i18n name="/package path.....">
        <s:property value="%{getText('language')"/>
        <s:property value="%{getText('username')"/> 
        <s:property value="%{getText('password')"/>
        </s:i18n>
             
        
        </li>
        <li>
        
            <s:param name="request_locale">fr</s:param>
            <s:i18n name="/package path....">
            <s:property value="%{getText('language')"/>
        <s:property value="%{getText('username')"/> 
        <s:property value="%{getText('password')"/>
            </s:i18n>            
        </li>
    <li>
              <s:param name="request_locale">it</s:param>
              <s:i18n name="/package path....">
        <s:property value="%{getText('language')"/>
        <s:property value="%{getText('username')"/> 
        <s:property value="%{getText('password')"/>
           </s:i18n>
            
            
        </li>
          
  
</ul>

Ted Husted <hu...@apache.org> wrote: The code here appears to be trying to store the new settings for the
client as they are being changed. Of course, that's a good idea, but
it also might be confusing the markup.

First, I'd try simplifying the page so that it just changes the
locale, as we do here

* http://struts.apache.org/2.x/docs/localizing-output.html

Once that is known to work, then add the code that stores the locale
under the client's login ID.

And, of course, at some point, the login password should be removed,
as it would represent a security concern. Values like a password can
be stored in the session, which is secure, and then accessed by the
Action class as needed

-- HTH, Ted.
* http://www.husted.com/struts/


On 2/7/07, manoj sinha  wrote:
> Hi,
> Expecting solution:i m writing Login Form with Internationlization support.But as i  Select Language  it doesn't reflect in Form Field.Pls Suggest ASAP
> 
>     
>    value="English" >
>   
>
>   
>
>   
>     
   
>
>   
> 
>
> 
>             en
>         
>         
>         
>         
>
>
>         
>         
   
>         
>             fr
>                  
>         
>         
>         
>
>
>         
>     
   
>               
>         it
>         
>         
>         
>
>             
>
>         
>
>
> 

>
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




=================
With Warm Regads
Manoj Sinha
09335274190
 
---------------------------------
Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.

Re: Wanna Solution on Internationalization!!!!

Posted by Ted Husted <hu...@apache.org>.
The code here appears to be trying to store the new settings for the
client as they are being changed. Of course, that's a good idea, but
it also might be confusing the markup.

First, I'd try simplifying the page so that it just changes the
locale, as we do here

* http://struts.apache.org/2.x/docs/localizing-output.html

Once that is known to work, then add the code that stores the locale
under the client's login ID.

And, of course, at some point, the login password should be removed,
as it would represent a security concern. Values like a password can
be stored in the session, which is secure, and then accessed by the
Action class as needed

-- HTH, Ted.
* http://www.husted.com/struts/


On 2/7/07, manoj sinha <ma...@yahoo.com> wrote:
> Hi,
> Expecting solution:i m writing Login Form with Internationlization support.But as i  Select Language  it doesn't reflect in Form Field.Pls Suggest ASAP
> <s:form action="Login">
>     <s:combobox  name="language" list="{'English','French','Italian'}"
>    value="English" ></s:combobox>
>   <s:textfield label="%{getText('loginlang.loginid')}" name="username"/>
>
>   <s:password label="%{getText('loginlang.password')}" name="password" />
>
>   <ul>
>     <li>
>
>   <s:submit/><s:reset/>
> </s:form>
>
> <s:url id="en" action="Login">
>             <s:param name="request_locale" >en</s:param>
>         <s:property value="getText('loginlang.language')"/>
>         <s:property value="getText('longinlang.loginid')"/>
>         <s:property value="getText('longinlang.password')"/>
>         </s:url>
>
>
>         </li>
>         <li>
>         <s:url id="fr" action="Login">
>             <s:param name="request_locale">fr</s:param>
>                  <s:property value="getText('loginlang.language')"/>
>         <s:property value="getText('longinlang.loginid')"/>
>         <s:property value="getText('longinlang.password')"/>
>         </s:url>
>
>
>         </li>
>     <li>
>               <s:url id="it"action="Login">
>         <s:param name="request_locale">it</s:param>
>         <s:property value="getText('loginlang.language')"/>
>         <s:property value="getText('longinlang.loginid')"/>
>         <s:property value="getText('longinlang.password')"/>
>
>             </s:url>
>
>         </li>
>
>
> </ul>
>
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Wanna Solution on Internationalization!!!!

Posted by Dave Newton <ne...@yahoo.com>.
--- manoj sinha <ma...@yahoo.com> wrote:
> Sorry its not resolved. Can it be possible by using
> some Struts2 Tag. Suggestion and Solutions are 
> appreciated...

I thought I gave you reasonable solution, and it's an
easier one than dynamically changing the labels via
Ajax, which I don't really want to try to explain to
you (sorry).

> Dave Newton wrote:
>> As Ted suggested you may want to break the problem
>> down in to... more easily manageable steps. For
>> instance, allow the user to select their language
>> via a normal form submit *then* show the login
form.

d.



 
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Wanna Solution on Internationalization!!!!

Posted by manoj sinha <ma...@yahoo.com>.
Sorry its not resolved..Can it be possible by using some Struts2 Tag.....
Suggestion and Solutions are appreciated...

Dave Newton <ne...@yahoo.com> wrote: --- manoj sinha  wrote:
> Oh Yes!! Label should reflect changes as per
> Language Selection....
> 
> > list="{'English','French','Italian'}"
> >    value="English" >
> >   
> > label="%{getText('loginlang.loginid')}"
> > name="username"/>
> > [...]

Ah. Hmm. That's not really how it works... 

You're setting a form value and nothing will happen
until you submit it. If you want the labels to
dynamically change on language selection you'd need to
do something Ajaxy.

As Ted suggested you may want to break the problem
down in to... more easily manageable steps. For
instance, allow the user to select their language via
a normal form submit *then* show the login form.

Dave



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




=================
With Warm Regads
Manoj Sinha
09335274190
 
---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

Re: Wanna Solution on Internationalization!!!!

Posted by Dave Newton <ne...@yahoo.com>.
--- manoj sinha <ma...@yahoo.com> wrote:
> Oh Yes!! Label should reflect changes as per
> Language Selection....
> 
> > list="{'English','French','Italian'}"
> >    value="English" >
> >   
> > label="%{getText('loginlang.loginid')}"
> > name="username"/>
> > [...]

Ah. Hmm. That's not really how it works... 

You're setting a form value and nothing will happen
until you submit it. If you want the labels to
dynamically change on language selection you'd need to
do something Ajaxy.

As Ted suggested you may want to break the problem
down in to... more easily manageable steps. For
instance, allow the user to select their language via
a normal form submit *then* show the login form.

Dave



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Wanna Solution on Internationalization!!!!

Posted by manoj sinha <ma...@yahoo.com>.
Oh Yes!! Label should reflect changes as per Language Selection....

Dave Newton <ne...@yahoo.com> wrote: --- manoj sinha  wrote:
> Expecting solution

Aren't we all.

> But as i  Select Language  it doesn't reflect in
Form
> Field.Pls Suggest ASAP
> 
>     
> list="{'English','French','Italian'}"
>    value="English" >
>   
> label="%{getText('loginlang.loginid')}"
> name="username"/>
> [...]

Are you expecting the labels to change as you select
the language from the list?!

> 
>             
> [...]

What are all those URLs for?

Dave



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




=================
With Warm Regads
Manoj Sinha
09335274190
 
---------------------------------
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.

Re: Wanna Solution on Internationalization!!!!

Posted by Dave Newton <ne...@yahoo.com>.
--- manoj sinha <ma...@yahoo.com> wrote:
> Expecting solution

Aren't we all.

> But as i  Select Language  it doesn't reflect in
Form
> Field.Pls Suggest ASAP
> <s:form action="Login">
>     <s:combobox  name="language"
> list="{'English','French','Italian'}"
>    value="English" ></s:combobox>
>   <s:textfield
> label="%{getText('loginlang.loginid')}"
> name="username"/>
> [...]

Are you expecting the labels to change as you select
the language from the list?!

> <s:url id="en" action="Login">
>             <s:param name="request_locale"
> [...]

What are all those URLs for?

Dave



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org