Answers.Body: <p>To give this an answer, the URI can be set on a per-site basis, so it is simply a matter of setting the URI for the English site to <code>about-us</code> and the URI for the Dutch site to <code>over-ons</code> on the section's settings page.</p>
  <p>Then in your template, assuming you have the <code>entry</code>, you can fetch the entry in any other site and output its URL:</p>
  <pre><code>{% set dutchEntry = craft.entries.id(entry.id).site('dutch').one() %}
  {% if dutchEntry %}
      &lt;a href=&quot;{{ dutchEntry.url }}&quot;&gt;Dutch&lt;/a&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-23T13:11:05.323Z
Answers.Text: How do you translate this in the twig templates? Lets say <a href="{{ url('about-us') }}" when you want the dutch variant?
Answers.UserDisplayName: Kevon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-28T08:56:11.450Z
Answers.Text: Assuming you have the `entry`, you can just fetch the dutch entry and output its URL. I updated my answer with the code for this.
Answers.UserDisplayName: Ben Croker
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-28T09:08:03.570Z
Answers.LastActivityDate: 2021-09-28T08:59:48.513Z
Answers.LastEditDate: 2021-09-28T08:59:48.513Z
Answers.UserDisplayName: Ben Croker
Body: <p>I am trying to make the URLs translatable according to the language selected for the site.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-29T09:53:55.220Z
Comments.Text: What do you mean with translatable? Do you want to translate the slug or do you want to change the complete URL format?
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-30T10:44:19.807Z
Comments.Text: Which one is the best and translatable?
Comments.UserDisplayName: Kantesh Hotchandani
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-30T10:53:16.317Z
Comments.Text: I'm not sure what you want to know. You have to insert different values for different languages nothing more and nothing less. It's like every other field in Craft. Maybe you have to explain your issue properly
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-30T11:00:49.540Z
Comments.Text: I have site in 2 different languages english and dutch, for example One single entry for **About Us** so its english/dutch URL is www.demo.com/about-us but i want dutch url like www.demo.com/over-ons
Comments.UserDisplayName: Kantesh Hotchandani
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-30T11:05:05.490Z
Comments.Text: Ok, then go to your entry and change the slug field https://i.imgur.com/jVeyTjq.png I don't see any problem here
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-30T11:07:03.087Z
Comments.Text: But I am not able to see this option for Single Entries
Comments.UserDisplayName: Kantesh Hotchandani
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-30T11:09:18.680Z
Comments.Text: That's why you usually don't save those entries as single. They are not single entries, your `about us` page is a page so it belongs to a section `pages` thus a channel or something. You can only change the structure of the url in your section settings. Singles are only things like home pages or starting pages or some other special stuff
Comments.UserDisplayName: Robin Schambach
Tags: <localization><url><craft3><siteurl>
Title: How to make URLs translatable in Craft 3
ThreadText: # How to make URLs translatable in Craft 3
  
  (Asked by: username_0 on 2018-01-29)
  
  I am trying to make the URLs translatable according to the language selected for the site.
  
  **Tags:** localization, url, craft3, siteurl
  
  > **Comments:**
  > **username_1**: What do you mean with translatable? Do you want to translate the slug or do you want to change the complete URL format?  
  > **username_0**: Which one is the best and translatable?  
  > **username_1**: I'm not sure what you want to know. You have to insert different values for different languages nothing more and nothing less. It's like every other field in Craft. Maybe you have to explain your issue properly  
  > **username_0**: I have site in 2 different languages english and dutch, for example One single entry for **About Us** so its english/dutch URL is www.demo.com/about-us but i want dutch url like www.demo.com/over-ons  
  > **username_1**: Ok, then go to your entry and change the slug field https://i.imgur.com/jVeyTjq.png I don't see any problem here  
  > **username_0**: But I am not able to see this option for Single Entries  
  > **username_1**: That's why you usually don't save those entries as single. They are not single entries, your `about us` page is a page so it belongs to a section `pages` thus a channel or something. You can only change the structure of the url in your section settings. Singles are only things like home pages or starting pages or some other special stuff  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-11-28. Score: 1
  
  To give this an answer, the URI can be set on a per-site basis, so it is simply a matter of setting the URI for the English site to `about-us` and the URI for the Dutch site to `over-ons` on the section's settings page.
  
  Then in your template, assuming you have the `entry`, you can fetch the entry in any other site and output its URL:
  
  ```
  {% set dutchEntry = craft.entries.id(entry.id).site('dutch').one() %}
  {% if dutchEntry %}
      <a href="{{ dutchEntry.url }}">Dutch</a>
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_3**: How do you translate this in the twig templates? Lets say <a href="{{ url('about-us') }}" when you want the dutch variant?  
  > **username_2**: Assuming you have the `entry`, you can just fetch the dutch entry and output its URL. I updated my answer with the code for this.  
  
  ---
  
  