We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

EE2 loses internationalization prefix

Development and Programming

Ralf G.'s avatar
Ralf G.
7 posts
15 years ago
Ralf G.'s avatar Ralf G.

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

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
15 years ago
John Henry Donovan's avatar John Henry Donovan

Ralf,

I replicated your set-up and saw one or two things I had a question about so I am asking devs about this for you. We will update you here when we receive an answer. Thanks for your patience

       
Ralf G.'s avatar
Ralf G.
7 posts
15 years ago
Ralf G.'s avatar Ralf G.

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

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
15 years ago
Sue Crocker's avatar Sue Crocker

Hi, Ralf. Which build/version of EE2.x are you testing with? This would probably be a better fit for the Development and Programming forum.

       
Ralf G.'s avatar
Ralf G.
7 posts
15 years ago
Ralf G.'s avatar Ralf G.

Hi Sue,

Version 2.1.0 Build: 20100720 that is.

Regards Ralf

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.