<VirtualHost *:80>
ServerName blah.com
ServerAlias de.blah.com en.blah.com fr.blah.com
...
</VirtualHost>
Read more about server aliases: http://httpd.apache.org/docs/2.0/en/mod/core.html#serveralias
Your Symfony filter can simply parse the domain during the first request and set a session variable.
This is untested but should work:
<?php class localeFilter extends sfFilter
{
public function execute($filterChain)
{
// Execute this filter only once
if ($this->isFirstCall()) {
$host = $_REQUEST['HTTP_HOST'];
$locale = array_shift(explode(".",$host));
$this->getUser()->setAttribute('locale', $locale);
}
// Execute next filter
$filterChain->execute();
}
} ?>