Hi Dan,
I’ve followed one of the guides on how to set up multilingual sites with EE.
As I mentioned I basically have each country index.php inside its own folder name based on the country code eg. us, au, fr, ca etc
Each index.php would have something like this:
$assign_to_config['template_group'] = '';
$assign_to_config['template'] = '';
$assign_to_config['site_index'] = '';
$assign_to_config['site_404'] = '';
$assign_to_config['global_vars'] = array(
"country_name" => "United States",
"country_code" => "us",
"language_name" => "english",
"language" => "en",
"language_name_alt" => "",
"language_alt" => ""
);
It contains some extra variables to help me set second country language and code.
The .htaccess file contains this:
<IfModule mod_rewrite.c>
RewriteEngine On
# Catch any Google campaigns directed to the home page
RewriteCond %{REQUEST_URI} ^/us/$
RewriteCond %{QUERY_STRING} (gclid=.*)
RewriteRule ^(.*)$ /us/index.php/? [L,PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond $1 !^(images|_system|themes|index\.php|admin\.php) [NC]
RewriteRule ^(.*)$ /us/index.php/$1 [L]
</IfModule>
My problem is that to be able to get pages uri to work I obviously would need to give it a unique name. As I mentioned, I’ve tried /us/privacy but the end result would expect the URL to be http://www.domain.com/us/us/privacy.
You now actually got me thinking about the .htaccess file whether to detect if the page requested is not the home page and then append the us/ to the URL.
Anyway, any advice would be great.
Thanks,
Jacek