Working in ZF: Is it possible to change the base or root url on the www.example.com to www.example.com/$language/home, thus depending on the (browser) locale of the users browser? 

Example; If a guest manually types www.example.com I would like to change the url automatically to a url with locale: www.example.com/en/home for guests in en\_GB region or www.example.fr/home for guests in fr\_FR region. 

From the root-url I have all the menu-urls and content locale aware. Clicking a link to a menu item in the url the lang is automatically added after the root. The content on the root url is locale aware too using translate, so english for en\_GB en french for fr\_FR, etc. 

Still missing though I would like to have the root url change to locale aware right from the start of the visit to the application if only the root is entered.

I guess something like
 root :to => redirect("/prepayments")
in Rails 3 from what I understand from [this Q&A on this forum](https://stackoverflow.com/questions/2066504/redirect-root-url-to-somewhere-else-in-rails-application)

I have tried and implemented controller action helpers, redirects, etc. etc. for as far as I could find on this forum, but they all don't offer the solution.  

A redirect in htaccess is not possible I think since I first need to get the locale from the browser. Since I don't know this the redirect is dynamic and I cannot set a redirect in htaccess. 

I woud appreciate any suggestions?