Answers.Body: <p>The following code should work for you:</p>
  
  <pre><code> {% if entry.isEditable() %}
      &lt;a href="{{ entry.cpEditUrl }}/{{ craft.locale }}"&gt;Edit entry&lt;/a&gt;
   {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-14T14:41:54.263Z
Answers.LastActivityDate: 2016-09-14T14:41:54.263Z
Answers.UserDisplayName: Tom Bauer
Body: <p>I use the following code to link to the CP from the front end:</p>
  
  <pre><code>{% if entry.isEditable() %}
    &lt;a href="{{ entry.cpEditUrl }}"&gt;Edit entry&lt;/a&gt;
  {% endif %}
  </code></pre>
  
  <p>What do I have to add to link to the correct locale as it always jumps to the global locale instead of the current one?</p>
  
Tags: <localization>
Title: How can I localize cpEditUrl?
ThreadText: # How can I localize cpEditUrl?
  
  (Asked by: username_0 on 2016-05-25)
  
  I use the following code to link to the CP from the front end:
  
  ```
  {% if entry.isEditable() %}
    <a href="{{ entry.cpEditUrl }}">Edit entry</a>
  {% endif %}
  
  ```
  
  What do I have to add to link to the correct locale as it always jumps to the global locale instead of the current one?
  
  **Tags:** localization
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-09-14. Score: 2 | Accepted answer
  
  The following code should work for you:
  
  ```
   {% if entry.isEditable() %}
      <a href="{{ entry.cpEditUrl }}/{{ craft.locale }}">Edit entry</a>
   {% endif %}
  
  ```
  
  
  ---
  
  