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

CC BY-SA 3.0
2016-09-14T14:41:54.263Z
2016-09-14T14:41:54.263Z
Tom Bauer
<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>

<localization>
How can I localize cpEditUrl?
# 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() %}
  Edit entry
{% 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() %}
    Edit entry
 {% endif %}


---

