You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by yogi1313 <yo...@gmail.com> on 2008/04/21 01:52:14 UTC

Locale Field in Struts URL's

Hi all ,

We are using struts to build a Global website which will be localized in
over 30 languages.
One of our requirement for SEO is to not have any locale field in the URL's
.
In standard approach when we localize a site we have a locale field in the
URL which is then used to identify the correct struts config file.
e.g http://localhost:5555/en_US/home.do or
http://localhost:5555/en_GB/home.do
We have a corresponding mapping in the web.xml as initparam to Action
Servlet
<init-param>
            <param-name>config/en_US</param-name>
            <param-value>/WEB-INF/struts-en_US.xml</param-value>
        </init-param>

We now want to get rid of teh locale field e.g en_US and en_GB in teh URL's
and still use individual struts file for each locale.

Any thoughts on the above ?

Regards 
Yogesh
-- 
View this message in context: http://www.nabble.com/Locale-Field--in-Struts-URL%27s-tp16800297p16800297.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Locale Field in Struts URL's

Posted by Laurie Harper <la...@holoweb.net>.
yogi1313 wrote:
> Hi all ,
> 
> We are using struts to build a Global website which will be localized in
> over 30 languages.
> One of our requirement for SEO is to not have any locale field in the URL's
> ..
> In standard approach when we localize a site we have a locale field in the
> URL which is then used to identify the correct struts config file.
> e.g http://localhost:5555/en_US/home.do or
> http://localhost:5555/en_GB/home.do
> We have a corresponding mapping in the web.xml as initparam to Action
> Servlet
> <init-param>
>             <param-name>config/en_US</param-name>
>             <param-value>/WEB-INF/struts-en_US.xml</param-value>
>         </init-param>
> 
> We now want to get rid of teh locale field e.g en_US and en_GB in teh URL's
> and still use individual struts file for each locale.
> 
> Any thoughts on the above ?

Why do you need different struts.xml files for each locale? That's not 
usually necessary for I18N. Do you have substantially different page 
layouts, workflows, etc. for different locales? Without some idea of why 
you're doing this, and how you intend it to work without the 
differentiating locale string in the URL, it'll be hard for anyone to 
offer meaningful advice.

L.


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