URL used for localization seems to have locale in path?

2011-06-22 Thread dkeenan
Hi there. When using localization to display different template files based
on the locale, it seems to ad the locale to the URL. Is that normal
behaviour?

Eg. I have 2 homepage files... Home_en.tml and Home_fr.tml.

If I set the locale to French, and go to the homepage, if goes to URL
/fr/Home rather than /Home. The problems is that may page uses relative CSS
paths which mean it doesn't display correctly. If I want to share css files
between 2 different templates in this case, it gets a little messy. Does it
look like Ive done something wrong?

Many thanks,

Dave.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/URL-used-for-localization-seems-to-have-locale-in-path-tp4513977p4513977.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: URL used for localization seems to have locale in path?

2011-06-22 Thread Joost Schouten (ml)
 You have done nothing wrong and this is the way it is supposed to 
work. I believe you can set the locale to be stored in a cookie as well 
in stead of the locale. Though for SEO the locale in de url is generally 
a good option. Have a look at [1]


Are you including css directly in the page using style tags? If so, 
externalizing your css into a seperate css file will solve your issue.


Hope it helps,
Joost

[1] 
http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/SymbolConstants.html#ENCODE_LOCALE_INTO_PATH


On 22/06/11 3:12 PM, dkeenan wrote:

Hi there. When using localization to display different template files based
on the locale, it seems to ad the locale to the URL. Is that normal
behaviour?

Eg. I have 2 homepage files... Home_en.tml and Home_fr.tml.

If I set the locale to French, and go to the homepage, if goes to URL
/fr/Home rather than /Home. The problems is that may page uses relative CSS
paths which mean it doesn't display correctly. If I want to share css files
between 2 different templates in this case, it gets a little messy. Does it
look like Ive done something wrong?

Many thanks,

Dave.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/URL-used-for-localization-seems-to-have-locale-in-path-tp4513977p4513977.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: URL used for localization seems to have locale in path?

2011-06-22 Thread Thiago H. de Paula Figueiredo
On Wed, 22 Jun 2011 10:12:45 -0300, dkeenan david_siedle...@yahoo.co.uk  
wrote:



Hi there.


Hi!

When using localization to display different template files based on the  
locale, it seems to ad the locale to the URL. Is that normal

behaviour?


Yes.


If I set the locale to French, and go to the homepage, if goes to URL
/fr/Home rather than /Home. The problems is that may page uses relative  
CSS paths which mean it doesn't display correctly. If I want to share  
css files between 2 different templates in this case, it gets a little  
messy. Does it look like Ive done something wrong?


Use ${context:path/to/file.css} or ${classpath:path/to/file.css} and let  
Tapestry take care of paths.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org