You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Karsten Beyer (JIRA)" <ji...@apache.org> on 2008/06/06 15:47:45 UTC

[jira] Commented: (SHINDIG-352) GadgetRenderer(PHP) ignores locale information in iframe url

    [ https://issues.apache.org/jira/browse/SHINDIG-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603044#action_12603044 ] 

Karsten Beyer commented on SHINDIG-352:
---------------------------------------

see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 for a description of the ACCEPT_LANGUAGE parameter format.

> 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.