[
https://issues.apache.org/jira/browse/SHINDIG-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603045#action_12603045
]
Chris Chabot commented on SHINDIG-352:
--------------------------------------
I actually think that listening to the browsers accept language header is a bug
onto it's self, it should just be using the country and language setting that
were parsed by the container.
I'll first check the java code just to make sure that's what they do too though.
> GadgetRenderer(PHP) ignores locale information in iframe url
> ------------------------------------------------------------
>
> Key: SHINDIG-352
> URL: https://issues.apache.org/jira/browse/SHINDIG-352
> Project: Shindig
> Issue Type: Improvement
> Components: Gadget Rendering Server (PHP)
> Environment: lighttpd, Mac OS X
> Reporter: Karsten Beyer
>
> it seems that the GadgetRenderer ignores the parameters "country" and "lang"
> that are put into the iframe URL by for example partuza. I am not sure what
> the OpenSocial specification has to tell about this, but i think that the
> container should have preference regarding the language settings (e.g. if the
> SNS has some settings for the language of the user, this setting should take
> preference over the ACCEPT LANGUAGE ) of the browser.
> Example URL:
> http://shindig.kbsilver/gadgets/ifr?synd=default&container=default&viewer=4&owner=5&aid=33&mid=71&country=US&lang=EN...
> The ACCEPT LANGUAGE could be used as a fallback in case the container did not
> set it. Also:
> ["HTTP_ACCEPT_LANGUAGE"]=>
> string(35) "en,de;q=0.8,nl-be;q=0.5,fr-be;q=0.3"
> (Firefox 2.0.0.14 on Mac OS X)
> The code in GadgetContext->instanceLocale will not detect this correctly:
> $acceptLanguage = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
> $acceptLanguage = $acceptLanguage[0];
> if (strpos($acceptLanguage, '-') !== false) {
> Are there any plans to support matching multiple locales in the future? e.g.
> HTTP_ACCEPT_LANGUAGE = de-DE, fr-FR, en-US
> would mean that German is prefered. But if it is not there, French should
> first be looked for.
> A possible solution would be that the GadgetContext stores an array of
> locales. In the first position the one from the iframe URL, followed by the
> ones from the ACCEPT_LANGUAGE header. The GadgetServer should then traverse
> this array and pick the first one that is supported by the Gadget. If there
> was no match, the locales should be tested with country = ALL. If there is
> still no match, all-ALL should be used.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.