<p>Yes, <code>{{url('handle')}}</code> will output the correct URL for whichever localization your user is currently in. Be sure to adjust your <code>siteUrl</code> configuration in your <code>app/config/general.php</code> file. Depending on your set up, it can look something like this: </p>

<pre><code>return array(
    'siteUrl' =&gt; array(
        'en' =&gt; 'http://mysite.com/en',
        'fr' =&gt; 'http://mysite.com/fr'
    )
);
</code></pre>

<p>For more information, check out <a href="http://buildwithcraft.com/docs/localization-guide#step-4-define-your-site-uRLs" rel="nofollow">Step 4 in the Localization Guide</a>.</p>

CC BY-SA 3.0
2015-07-20T20:07:30.103Z
2015-07-20T20:07:30.103Z
Aaron Berkowitz
<p>Does <code>{{ url('handle') }}</code> output the right url for localized sites?</p>

<p>I have a fr/en site and both lang output the english paths, but shows the right content and language/strings on the page.</p>

<p>I'm a bit confused. How do you guys build your navigation?</p>

<url><localization><navigation>
Output localized urls in navigation
# Output localized urls in navigation

(Asked by: username_0 on 2015-07-10)

Does `{{ url('handle') }}` output the right url for localized sites?

I have a fr/en site and both lang output the english paths, but shows the right content and language/strings on the page.

I'm a bit confused. How do you guys build your navigation?

**Tags:** url, localization, navigation

---

## 1 answers

### Answer by username_1 on 2015-07-20. Score: 3 | Accepted answer

Yes, {{url('handle')}} will output the correct URL for whichever localization your user is currently in. Be sure to adjust your siteUrl configuration in your app/config/general.php file. Depending on your set up, it can look something like this: 
return array(
    'siteUrl' => array(
        'en' => 'http://mysite.com/en',
        'fr' => 'http://mysite.com/fr'
    )
);

For more information, check out Step 4 in the Localization Guide.


---

