You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@shindig.apache.org by Joel Cairney <jo...@caseware.com> on 2012/04/03 06:20:06 UTC

How can a gadget container tell shindig what the Locale is?

Hello shindig-users-help,

 

I've seen in the OpenSocial spec that in some version after OpenSocial
v0.9, the proper way to tell the gadget server the Locale of the
container is to pass functions returning the language and country as
properties of the container config object:

 

var config = {
                GET_LANGUAGE: function() { return 'en' },

                GET_COUNTRY: function() { return 'us' },              //
as a really simple example

};

 

var container = new shindig.container.Container(config);

 

(extrapolating from here:
https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container,
and here
http://opensocial-resources.googlecode.com/svn/spec/2.0/incubating/Core-
Container.xml)

 

However, new .Container() doesn't check for GET_LANGUAGE or GET_COUNTRY,
and the constants are not found in the shindig.container.ContainerConfig
set of constants where the other properties are named.  So how is
setting the Locale done with the version of OpenSocial implemented as
part of Shindig 2.0?

 

Much obliged,

--Joel


Re: How can a gadget container tell shindig what the Locale is?

Posted by Henry Saputra <he...@gmail.com>.
The easiest would be to see the iframe for gadget generated and see if
"lang" and "locale" params are set correctly.

- Henry

On Wed, Apr 4, 2012 at 11:56 AM, Joel Cairney <jo...@caseware.com> wrote:
> Hi Henry,
>
> I haven't been able to find a service.js or a features folder in my installation.  But I'm not too familiar with how things are laid out, so they may be there.
>
> In any case, how do I make use of this knowledge in code to make sure the right language and country are passed?
>
> Thanks,
> Joel
>
> -----Original Message-----
> From: Henry Saputra [mailto:henry.saputra@gmail.com]
> Sent: Wednesday, April 04, 2012 2:14 PM
> To: users@shindig.apache.org
> Subject: Re: How can a gadget container tell shindig what the Locale is?
>
> Hi Joel,
>
> Take a look at the service.js file under features/container directory.
> The language and locale is passed to server when trying to get metadata for gadget
>
> Hope this helps.
>
> - Henry
>
> On Mon, Apr 2, 2012 at 9:20 PM, Joel Cairney <jo...@caseware.com> wrote:
>> Hello shindig-users-help,
>>
>>
>>
>> I've seen in the OpenSocial spec that in some version after OpenSocial
>> v0.9, the proper way to tell the gadget server the Locale of the
>> container is to pass functions returning the language and country as
>> properties of the container config object:
>>
>>
>>
>> var config = {
>>                GET_LANGUAGE: function() { return 'en' },
>>
>>                GET_COUNTRY: function() { return 'us' },
>> // as a really simple example
>>
>> };
>>
>>
>>
>> var container = new shindig.container.Container(config);
>>
>>
>>
>> (extrapolating from here:
>> https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container,
>> and here
>> http://opensocial-resources.googlecode.com/svn/spec/2.0/incubating/Cor
>> e-
>> Container.xml)
>>
>>
>>
>> However, new .Container() doesn't check for GET_LANGUAGE or
>> GET_COUNTRY, and the constants are not found in the
>> shindig.container.ContainerConfig set of constants where the other
>> properties are named.  So how is setting the Locale done with the
>> version of OpenSocial implemented as part of Shindig 2.0?
>>
>>
>>
>> Much obliged,
>>
>> --Joel
>>
>
> --
> Click the link below to report this message as spam to Caseware E-Mail Security Server ESVA.
> http://esva5.caseware.com/cgi-bin/learn-msg.cgi?id=9A769287F9.EE858
>
>
>

RE: How can a gadget container tell shindig what the Locale is?

Posted by Joel Cairney <jo...@caseware.com>.
Hi Henry,

I haven't been able to find a service.js or a features folder in my installation.  But I'm not too familiar with how things are laid out, so they may be there.

In any case, how do I make use of this knowledge in code to make sure the right language and country are passed?

Thanks,
Joel

-----Original Message-----
From: Henry Saputra [mailto:henry.saputra@gmail.com] 
Sent: Wednesday, April 04, 2012 2:14 PM
To: users@shindig.apache.org
Subject: Re: How can a gadget container tell shindig what the Locale is?

Hi Joel,

Take a look at the service.js file under features/container directory.
The language and locale is passed to server when trying to get metadata for gadget

Hope this helps.

- Henry

On Mon, Apr 2, 2012 at 9:20 PM, Joel Cairney <jo...@caseware.com> wrote:
> Hello shindig-users-help,
>
>
>
> I've seen in the OpenSocial spec that in some version after OpenSocial 
> v0.9, the proper way to tell the gadget server the Locale of the 
> container is to pass functions returning the language and country as 
> properties of the container config object:
>
>
>
> var config = {
>                GET_LANGUAGE: function() { return 'en' },
>
>                GET_COUNTRY: function() { return 'us' },              
> // as a really simple example
>
> };
>
>
>
> var container = new shindig.container.Container(config);
>
>
>
> (extrapolating from here:
> https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container,
> and here
> http://opensocial-resources.googlecode.com/svn/spec/2.0/incubating/Cor
> e-
> Container.xml)
>
>
>
> However, new .Container() doesn't check for GET_LANGUAGE or 
> GET_COUNTRY, and the constants are not found in the 
> shindig.container.ContainerConfig set of constants where the other 
> properties are named.  So how is setting the Locale done with the 
> version of OpenSocial implemented as part of Shindig 2.0?
>
>
>
> Much obliged,
>
> --Joel
>

--
Click the link below to report this message as spam to Caseware E-Mail Security Server ESVA. 
http://esva5.caseware.com/cgi-bin/learn-msg.cgi?id=9A769287F9.EE858




Re: How can a gadget container tell shindig what the Locale is?

Posted by Henry Saputra <he...@gmail.com>.
Hi Joel,

Take a look at the service.js file under features/container directory.
The language and locale is passed to server when trying to get
metadata for gadget

Hope this helps.

- Henry

On Mon, Apr 2, 2012 at 9:20 PM, Joel Cairney <jo...@caseware.com> wrote:
> Hello shindig-users-help,
>
>
>
> I've seen in the OpenSocial spec that in some version after OpenSocial
> v0.9, the proper way to tell the gadget server the Locale of the
> container is to pass functions returning the language and country as
> properties of the container config object:
>
>
>
> var config = {
>                GET_LANGUAGE: function() { return 'en' },
>
>                GET_COUNTRY: function() { return 'us' },              //
> as a really simple example
>
> };
>
>
>
> var container = new shindig.container.Container(config);
>
>
>
> (extrapolating from here:
> https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container,
> and here
> http://opensocial-resources.googlecode.com/svn/spec/2.0/incubating/Core-
> Container.xml)
>
>
>
> However, new .Container() doesn't check for GET_LANGUAGE or GET_COUNTRY,
> and the constants are not found in the shindig.container.ContainerConfig
> set of constants where the other properties are named.  So how is
> setting the Locale done with the version of OpenSocial implemented as
> part of Shindig 2.0?
>
>
>
> Much obliged,
>
> --Joel
>

Re: How can a gadget container tell shindig what the Locale is?

Posted by jiho hwang <ji...@gmo-media.jp>.
Help me, Please!!!
I am working for GMO Media,Inc(http://www.gmo-media.jp/company/index.html).
My name is JiHo Hwang.
I am under development using shindig(java version).
As for shindig(java version), does shindig(java version) support Gadget 
Lifecycle Events?
Please I wait for an answer.

――――――――――――――――――――――――――――
~おかげさまで10周年。
     これからも、For your Smile , with internet.~
――――――――――――――――――――――――――――
 GMOメディア株式会社 GMO Media, Inc.
 システム開発部 
黄 志浩 Jiho Hwang

 〒150-8512 東京都渋谷区桜丘町26番1号 セルリアンタワー
  Phone  03-5456-2626(代表) 
  Fax    03-5459-6077
  Mail   jiho.hwang@gmo-media.jp
  URL    http://www.gmo-media.jp/
――――――――――――――――――――――――――――
        ■ GMO INTERNET GROUP ■ www.gmo.jp/
――――――――――――――――――――――――――――
----- Original Message ----- 
From: "Joel Cairney" <jo...@caseware.com>
To: <us...@shindig.apache.org>
Sent: Tuesday, April 03, 2012 1:20 PM
Subject: How can a gadget container tell shindig what the Locale is?


Hello shindig-users-help,



I've seen in the OpenSocial spec that in some version after OpenSocial
v0.9, the proper way to tell the gadget server the Locale of the
container is to pass functions returning the language and country as
properties of the container config object:



var config = {
                GET_LANGUAGE: function() { return 'en' },

                GET_COUNTRY: function() { return 'us' },              //
as a really simple example

};



var container = new shindig.container.Container(config);



(extrapolating from here:
https://cwiki.apache.org/confluence/display/SHINDIG/Common+Container,
and here
http://opensocial-resources.googlecode.com/svn/spec/2.0/incubating/Core-
Container.xml)



However, new .Container() doesn't check for GET_LANGUAGE or GET_COUNTRY,
and the constants are not found in the shindig.container.ContainerConfig
set of constants where the other properties are named.  So how is
setting the Locale done with the version of OpenSocial implemented as
part of Shindig 2.0?



Much obliged,

--Joel