I'm trying to check my craft locale to offer language switching but it seems that my french locale returns the "en" value???

When I run the following: {% if craft.locale == 'fr' %}

I instead get the contents of: {% if craft.locale == 'en' %}

Is anyone experiencing this? I don't see any code that could be messing with the code.

Note: the site url outputs just fine: mysite.dev/fr/ BUT if I print {{ craft.locale }} I get "en".

1 Answer 1


You probably forgot to set the CRAFT_LOCALE constant for your French site in /fr/index.php, to tell Craft which locale's content to serve.

  • Yup... that was it! I completely forgot about those files! Thanks!
    – cballenar
    Aug 1, 2015 at 8:57

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.