So I'm setting up a multi-lingual site for the first time, and I'm having some problems with the urls.
I followed the guide, step by step. I've set up the siteUrl
in general.php
:
'DEV' => array(
'devMode' => true,
'siteUrl' => array(
'no' => 'http://teknologi.dev/no/',
'en' => 'http://teknologi.dev/en/',
'es' => 'http://teknologi.dev/es/'
),
),
And I guess that works, since I get a message in General settings that the siteUrl has been defined elsewhere.
Then I have a section called "Videos", which I've set up like this:
And when I list out all the entries, the URL to one entry looks right, but I'm getting a 404. If I however change the Entry URL Format to include the locale letters, ex: no/videoer/{slug}
, it works. But that makes the URLs write out the locales twice, so a URL might look like: http://teknologi.dev/no/no/videoer/orkanger
, which of course gives a 404.
So is there some step I've missed?
Edit: I also have this structure in my www
folder:
- .htaccess
- index.php // I needed this one for admin to work?
- no/
- .htaccess
- index.php
- en/
- .htaccess
- index.php
- es/
- .htaccess
- index.php
And in each of the localized index files I have changed the craftPath
and the CRAFT_LOCALE
$craftPath = '../../craft';
define('CRAFT_LOCALE', 'no');
While the root index.php points craftPath
to ../craft
.
Edit 2: I tried deleting the root index.php
, and while /no/
still worked, every subpage (ex: /no/videoer/
) gave this error message:
The requested URL /index.php was not found on this server.
Do I need to do anything in my .htaccess
for locales?
CRAFT_LOCALE
in each of the locales index.php, and I think that resulted in 404s all around.