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?