Locale/Language in URL?

6 views
Skip to first unread message

Franz Bettag

unread,
May 8, 2009, 10:28:57 PM5/8/09
to Lift
Heyho,

anyone has an idea how one might accomplish having the locale/language
of the content in the url? since most search engines can't work with
cookies and therefore change the language correctly, i wanted to go
for URLs like /de/mystuff or /en/mystuff. I guess everyone gets the
point.

Any ideas how to do that without compromising the whole Sitemap
feature?

best regards!

marius d.

unread,
May 9, 2009, 3:24:21 AM5/9/09
to Lift
Yeah ...

Please see LiftRules.urlDecorate

In your boot you can say something like:


LiftRules.urlDecorate.append {
case url => // here add the code that will add the lang query
parameter
}

With this, all URI-s toward your app should have the information you
appended.



Br's,
Marius
Reply all
Reply to author
Forward
0 new messages