schmittjoh/JMSI18nRoutingBundle — Issue #8: Undetected routes ?
Author: FMaz008
Created: 2011-10-18 19:38:28+00:00
State: open

Hi,

I've installed the bundle, and have a project with basically only 2 pages so far:
In my app/config/routing.yml :

_localeDispatcher:
pattern: /
defaults: { _controller: MyAppBundle:LocaleDispatcher:index }

_welcome:
pattern: /welcome
defaults: { _controller:MyAppBundle:Welcome:index }

In my app/config/config.yml

jms_i18n_routing:
default_locale: en
locales: [fr, en_CA, en, es]
strategy: prefix

Basically, my first page decide what's the best locale for the visitor, and redirect him to the proper route.
The URI his generated this way:

$arrParam = array('_locale' => $this->get('session')->getLocale());
$url = $this->container->get('router')->generate('_welcome', $arrParam);

So a couple of problems:
1) I've setup the prefix strategy, and the $url variable contain /welcome?_locale=en instead of /en/welcome
2) If I try to access /en/welcome, the route is not found
3) If I run i18n:extract-routes en --dry-run, none of my route are detected, only those of FOSUserBundle will appear.

I feel like it's a configuration problem, but their's almost no documentation or tutorials aside from /resources/doc/index.rst :(