Single Login Across i18n Subdomains in Drupal 7

A few of the Drupal sites I administer use the i18n module to server content in multiple languages on separate subdomains (example.com for English, cn.example.com for Simplified Chinese, and hk.example.com for Traditional Chinese).

One of the minor annoyances I'd been encountering while working with these sites was the need to login on each subdomain before being able to properly administer content. For example, when adding a translation I would get access denied messages until I logged into the subdomain of the language I wanted to add a translation for. Thankfully these problems are no more!

The solution is to edit the settings.php file in your sites/default/ directory and set the $cookie_domain variable. By default it will be commented out with a # and contain example.com. This line needs to be uncommented and changed to .example.com (Notice the extra "." before the domain). After the file is saved you will be logged out from the Drupal site but upon logging back in you should no longer have to sign in multiple times.

Comments

Did you find issues with the Domain and the Internationalization modules not working cleaning together?

I'm actually not using Domain Access and i18n together. i18n has basic support for language subdomains built in so using Domain Access is not necessary for language subdomains.

That was so cool to know the topic drupal here which i have read once on http://www.aubestsessays.com/ blogs article. It's really wonderful to get them and i hope the same form you people.