I'm using prefix for language selection, but always the connect.facebook.net/en_EN/all.js is loaded. Are there any reason not to use global $language against user_preferred_language($GLOBALS['user'])? In D7, the language selection methods have weight in en/admin/config/regional/language/configure, I think, the loaded js language should respect it.

CommentFileSizeAuthor
#1 fb_language_negotiation_1370248_1.patch537 bytesszantog

Comments

szantog’s picture

Status: Active » Needs review
StatusFileSize
new537 bytes

and patch.

mrf’s picture

Status: Needs review » Reviewed & tested by the community

Yes, the global $language variable should be the first and often the only source of language information on a Drupal site. If that doesn't return anything useful other sources like user language or the provided language from the Facebook signed request should be consulted.

I think there is another bug with the different available language options being set by FB, but wasn't able to pin down where that was supposed to happen so had to variable_set the options myself.

This patch is a crucial part of fixing language selection though, I came up with an identical patch in order to get language negotiation working correctly locally.

Dave Cohen’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reviewing and bringing back to my attention.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.