Hello,
you can manage it in directly in your routes
## Detect language in routes
dispatch('/:locale/contact', 'contact');
function contact($locale)
{
# Check if $locale is part of the available languages
# or provide a fallback… then set current language
#
# set-language($locale);
#
}
You can also detect the language directly in your bootstrap file and
use the selected language to write your routes
$uri = request_uri();
$localized = preg_match('%^/(\w{2})%', $uri, $matches);
$locale = $matches[1];
# Then set routes
#
$options = array('params' => array('locale' => $locale));
dispatch("/$locale/contact", 'contact', $options);
dispatch("/$locale/my_page", 'my_page', $options);
# Using options params provide locale value to controllers
#
function contact($locale)
{
#
}
++ Fabrice