Forum Moderators: coopster

Message Too Old, No Replies

Persistance for Multi Languages

Which is better? Cookies or Query Strings

         

neophyte

9:14 am on Sep 10, 2010 (gmt 0)

10+ Year Member



Hello All -

I've been going back and forth on this for a week while preparing for a client upgrade which requires multi-language content, but now I've got to get going on the coding and still can't make up my mind whether or not it's better to set a project's content language via a query string for each request, or just once via a dropped cookie.

Or maybe there's another way that I haven't thought of.

Cookies, of course, are problematic because the user can block them via their browser which makes me lean toward the query string solution.

What's the opinion of the good guys and gals at WebmasterWorld on this subject?

Neophyte

wildbest

9:48 am on Sep 10, 2010 (gmt 0)

10+ Year Member



it's better to set a project's content language via a query string for each request, or just once via a dropped cookie.

Why not both?

jdMorgan

10:52 am on Sep 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It has been "traditional" to set and test a cookie, and if it fails, to maintain such "user options" using a query string appended to the site's URLs.

Another method is to put the language selection into the URL itself, either in the URL-path (as in example.com/en/) or as a subdomain (like en.example.com/). This latter method also makes it trivial for the search engines to spider and index the various-language pages as separate entities.

Jim

neophyte

12:55 am on Sep 11, 2010 (gmt 0)

10+ Year Member



Wildbest, JdMorgan and JAB -

Thanks for your replies; I think I'll try the cookie/query-string option first then work up to the "example.com/en/" suggestion in the next version.

Thanks to all for your suggestions.

Neophyte