1

The site has 5 locales targeting 'en_gb', 'fr_fr', 'de_de', 'it_it', 'es_es'. When I'm at site.com it gets current locale correctly en_gb. When I visit site.com/fr/ locale, It loads blank page with current locale en_gb. The same scenario repeats for all locales, except the top level local en_gb.

I went through my settings multiple times, but I still wasn't able to find a problem.

My general.php settings:

return array(   

// Local environment
'site.craft.dev' => array(
    'devMode' => true,
    'environmentVariables' => array(
        'sitePath' => '/OS/Applications/MAMP/sites/site.craft.dev/public/',
        'siteUrl' => 'http://site.craft.dev/'
        ),
    'siteUrl' =>  array(
        'en_gb' => 'http://site.craft.dev/',
        'fr_fr' => 'http://site.craft.dev/fr/',
        'de_de' => 'http://site.craft.dev/de/',
        'it_it' => 'http://site.craft.dev/it/',
        'es_es' => 'http://site.craft.dev/es/',
        ),
    )
);

Public folders are structured and set according to documentation, named after locale's handles like that: fr_fr, de_de etc.

and with $craftPath variable set to necessary handle like fr_fr, de_de etc.

When I visit site.craft.dev/fr/ and ask for current locale by {{ craft.i18n.getCurrentLocale() }}, it gives me default locale en_gb.

  • Have you set CRAFT_LOCALE in your index.php? define('CRAFT_LOCALE', 'fr_fr'); for the French one. – Marion Newlevant Nov 8 '15 at 0:01
  • Yes I have for all the locales. – Dom Krulak Nov 8 '15 at 0:07
  • .htaccess for each locale? – carlcs Nov 8 '15 at 1:17
  • @carlcs .htaccess for each locale – Dom Krulak Nov 8 '15 at 8:30
  • 1
    Same content != no content. What do you see? – carlcs Nov 8 '15 at 22:51
2

The craft path should be 1 level deeper like that '../../craft' instead of '../craft'. This is what was causing it, but I had to reconfigure the locales from fr_fr to fr. It didn't work in original way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.