Hi,
I implemented a site for multiple languages like it is outlined in this nice blog article.
So I have a directory “en” with a index.php, containing
$assign_to_config['global_vars'] = array(
'country_code' => 'en'
); // This array must be associative
[...]
// $assign_to_config['site_name'] = '';
// $assign_to_config['cp_url'] = '';
$assign_to_config['site_url'] = 'http://A_SERVER/en/';This works in principle, but whenever EE2 should generate a link, it loses the information.
Example:
A contact form on a page /en/site/contact, in a template site/contact with exp✉️contact_form. The contact form gets sent, but the redirect from EE “forgets” about the “/en/”, redirecting to “/site” instead “/en/site”.
This happens with every generated link or redirect from EE, in comments, in previous/next-links.
What am I doing wrong?
Thanks Ralf
Moved to Development and Programming by Moderator
Hi,
just an additional info:
http://A_SERVER/en/stores is standing in browsers adressbar.
My little plugin printing $this->EE->functions->fetch_current_uri() into the page’s output says it’s
http://A_SERVER/stores
Obviously something with the url-routing system is completely wrong.
And obviously no author of blogposts of the kind “hey, it’s so easy to have a multilingual site with EE2” really tried it out. Funny, isn’t it?
Regards Ralf
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.