# Wagtail finding url name for submitting new translation

We're adding Translations tab to the wagtail admin edit pages. Something like this:-

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673946914399/db2d0b07-2394-44bf-813b-3d59079cecbc.png align="center")

And if there's no translation yet, add link for creating new translation like this:-

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673946963035/b809b6f0-4161-4819-acd3-6fad9ff434ad.png align="center")

So I was scouring wagtail github repo looking for the url name to be used in the template. The url name for showing the translated version is easy, since it just an edit page. We can find it in `wagtail/admin/urls/pages.py` through the EditView class.

The url to submit for new translation however can't be found anywhere. Then it comes to my mind maybe it's not implemented in wagtail but in the wagtail-localize app. I looked into that app repo but can't find anything as well. Btw you can find urls for wagtail-localize app in `wagtail_localize/wagtail_hooks.py`. You can thank me later.

Fortunately I remembered that we can list all urls through `django-extensions` show\_urls command.

```python
poetry run python manage.py show_urls
```

That will list all urls defined in all installed app. You will see something like this:-

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673948593225/c9d474a7-820c-42d1-92c9-618bbf5fe2c3.png align="center")

Turn out the urls is define in `simple_translation` app. The templates then looks like this:-

```python
<fieldset>
    {% if self.heading %}
        <legend class="w-sr-only">{{ self.heading }}</legend>
    {% endif %}
    <div class="{{ self.classname }}">
    {% for translation in self.instance.get_translations %}
    <li><a href="{% url 'wagtailadmin_pages:edit' translation.id %}">{{ translation.title }}</a></li>
    {% empty %}
    <a href="{% url 'simple_translation:submit_page_translation' self.instance.id %}">Add New Translation</a>
    {% endfor %}
    </div>
</fieldset>
```

On how to add custom tab like above, I guess that would be for another post ;)
