<p>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.</p>

CC BY-SA 3.0
2015-08-01T08:57:49.930Z
Yup... that was it! I completely forgot about those files! Thanks!
cballenar
CC BY-SA 3.0
2015-08-01T07:06:49.417Z
2015-08-01T07:06:49.417Z
carlcs
<p>I'm trying to check my craft locale to offer language switching but it seems that my french locale returns the "en" value???</p>

<p>When I run the following:
<code>{% if craft.locale == 'fr' %}
</code></p>

<p>I instead get the contents of:
<code>{% if craft.locale == 'en' %}
</code></p>

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

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

<localization>
French local returns "en"?
# French local returns "en"?

(Asked by: username_0 on 2015-08-01)

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".

**Tags:** localization


---

## 1 answers

### Answer by username_1 on 2015-08-01. Score: 3 | Accepted answer

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.

> **Comments:**
> **username_0**: Yup... that was it! I completely forgot about those files! Thanks!  

---

