Martin Grigorov-4 wrote
> 
> The segment with the locale should be removed by the IRequestMapper as
> LocaleFirstMapper does.
> 

But on UrlRenderer#renderContextRelativeUrl, getBaseUrl() shows pt-br/home
when I'm accessing http://localhost:8990/Site/pt-br/home

This caused my tags to be rewritten from:
        <link rel="stylesheet" type="text/css" href="styles/cssreset-min.css" />
to:
        <link rel="stylesheet" type="text/css" 
href="../styles/cssreset-min.css" />

The first is the one I want, since the resources is also mounted with
LocaleFirstMapper, and I want it there.

So maybe some setBaseUrl call is missing, to adjust the URL on the
UrlRenderer.


Martin Grigorov-4 wrote
> 
> But in your case you have the locale hardcoded in the .css file, or at
> least this is what I understood, and Wicket should not remove anything
> that is not added by it.
> 

It's not hardcoded. It's relative and I want Wicket to preserve the locale
on the URL, but it's stripping it.

My resources are not localized, but looks better for me to mount them under
the locale prefix, since Wicket could not rewrite embedded or inline CSS,
and I want to use relative paths there too.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-URLs-with-locale-prefix-tp4651528p4651562.html
Sent from the Users forum mailing list archive at Nabble.com.

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

Reply via email to