Alex Rivera | Logout

What is the best place to display the language in your URL?

Asked 2010-05-28T18:35:24.567
23

I have a multi-language website that makes use of pretty URLs, so called search-engine-friendly URLs.

Now there are a few places to define the language in the URL:

    • www.example.com/en/articles/random
    • www.example.com/nl/articles/random
    • en.example.com/articles/random
    • nl.example.com/articles/random
    • www.example.com/articles/random?lang=en
    • www.example.com/articles/random?lang=nl

Is there any preferred way of showing this, or is there another better way that I did not include?

Edit
Report

1 Answer

0

I am far away from knowing the "right" answer (I assume there isn't any) but as you ask for comments, here is mine:

A URL (or URI) is something that describes or identifies a resource. If I remember correctly the URL should not depend on how the resource should be displayed (HTML, XML, JSON, etc.).

You could also consider the language as a way to specify how the resource should be displayed.

So in my opinion, the last option, namely specifying the language as a parameter would be more appropriate.

answered 2010-05-28T18:45:26.257

Your Answer