Answers.Body: <p>You can’t set the <code>craft.locale</code> from the template. You can set the locale for your Element Criteria though.</p>
  
  <pre><code>{% set entry = craft.entries.id(14).locale('en').first() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-31T10:35:09.193Z
Answers.Text: hmm, that might work. Let me check that and see if I can fix it with this
Answers.UserDisplayName: Jan_dh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-31T09:27:03.790Z
Answers.LastActivityDate: 2017-01-31T09:27:03.790Z
Answers.UserDisplayName: carlcs
Body: <p>I was wondering if there 's a quick way to just set a locale in your template for example:</p>
  
  <pre><code>{% set locale = 'en' %}
  </code></pre>
  
  <p>and then use that locale to get the correct content. I know that Craft automaticly uses the right locale based on the url, but I'm importing some templates from Craft with curl into another site and so the Craft template is unaware of the locale. That's why I would like to set it, if possible without the use of an extra plugin.</p>
  
Tags: <localization>
Title: Set Locale in template
ThreadText: # Set Locale in template
  
  (Asked by: username_0 on 2017-01-31)
  
  I was wondering if there 's a quick way to just set a locale in your template for example:
  
  ```
  {% set locale = 'en' %}
  
  ```
  
  and then use that locale to get the correct content. I know that Craft automaticly uses the right locale based on the url, but I'm importing some templates from Craft with curl into another site and so the Craft template is unaware of the locale. That's why I would like to set it, if possible without the use of an extra plugin.
  
  **Tags:** localization
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-31. Score: 4 | Accepted answer
  
  You can’t set the `craft.locale` from the template. You can set the locale for your Element Criteria though.
  
  ```
  {% set entry = craft.entries.id(14).locale('en').first() %}
  
  ```
  
  > **Comments:**
  > **username_0**: hmm, that might work. Let me check that and see if I can fix it with this  
  
  ---
  
  