5

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?

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.