Localization query

0 views
Skip to first unread message

sharath

unread,
Apr 28, 2008, 8:46:43 AM4/28/08
to Orkut Developer Forum
Hello,

I went through Localization wiki and tried few sample programs with
message bundles.
Only default message bundle is working.
whereas language specific bundles are not working.
Is it fully supported in orkut as of now, if so what is the exact
procedure to implement.?
Does container choose the appropriate bundle automatically depending
on the user language or should we pass it through a script?

Regards
Sharath

verma6uc

unread,
Apr 28, 2008, 12:27:02 PM4/28/08
to Orkut Developer Forum
It does work ... Tell me the exact details of the problem

Jerome

unread,
Apr 28, 2008, 3:43:37 PM4/28/08
to Orkut Developer Forum
Hi Sharath,

The container uses the "display language:" setting to decide which
message bundle to use. You can set this parameter from the Settings
menu (last item from the left side bar, with a small tool icon).

This is working fine in both the sandbox and the production Orkut (for
users setting their country to Estonia and India obviously).

I hope this helps.

Jerome

sharath

unread,
Apr 28, 2008, 9:39:45 PM4/28/08
to Orkut Developer Forum
I tried portuguese language, its not working even though I have a
message bundle for portugese named pt_ALL.xml, its displaying english
from ALL_ALL.xml

sharath

unread,
Apr 28, 2008, 9:49:09 PM4/28/08
to Orkut Developer Forum
Hi,

My english message bundle is as below, Also ALL_ALL.xml is same
<?xml version="1.0" encoding="UTF-8" ?>
<messagebundle>
<msg name="title">
English Title
</msg>
<msg name="desc">
English Description
</msg>
</messagebundle>


portugese bundle is a s below:
<?xml version="1.0" encoding="UTF-8" ?>
<messagebundle>
<msg name="title">
Portugese Title
</msg>
<msg name="desc">
Portugese Description
</msg>
</messagebundle>

In Module prefernces i have substituted __MSG_desc__ for description,
for english its working, when i change to portugese as display
language its showing english description.

Jerome

unread,
Apr 28, 2008, 11:05:59 PM4/28/08
to Orkut Developer Forum
Hi Sharath,

Everything looks good from what you described above, as long as you
have the following 2 lines in your gadget ModulePrefs, with
http://example.com/hello/ replaced with the location where your
message bundles are hosted:

<Locale lang="en" messages="http://example.com/hello/en_ALL.xml"/>
<Locale lang="pt" messages="http://example.com/hello/pt_ALL.xml"/>

For a quick test, you would be better of trying the __MSG_desc__ in
your gadget body. I am not sure what the caching policy is for the
gadget description on the Orkut sandbox.

If you want to see the localization working for a gadget, check
Friends' Time in the directory. The days and months are localized and
this is working good.

Jerome

sharath

unread,
Apr 29, 2008, 5:38:28 AM4/29/08
to Orkut Developer Forum
Hi Jerome,

Thanks for your reply.
I tried in the gadget body also but its not working, even tested your
application;
I could not see the language change even after changing display
language setting to estonia.

Regards
Sharath

On Apr 29, 8:05 am, Jerome <jerome.mou...@gmail.com> wrote:
> Hi Sharath,
>
> Everything looks good from what you described above, as long as you
> have the following 2 lines in your gadget ModulePrefs, withhttp://example.com/hello/replaced with the location where your

Jerome

unread,
Apr 29, 2008, 10:26:50 AM4/29/08
to Orkut Developer Forum
Sharath,

Display language set to Eesti is a wrong example for my gadget, as I
have not created a message bundle for Eesti. Try German, French,
Spanish, Finish, etc.

Jerome

On Apr 29, 4:38 am, sharath <sharath2...@gmail.com> wrote:
> Hi Jerome,
>
> Thanks for your reply.
> I tried in the gadget body also but its not working, even tested your
> application;
> I could not see the language change even after changing display
> language setting to estonia.
>
> Regards
> Sharath
>
> On Apr 29, 8:05 am, Jerome <jerome.mou...@gmail.com> wrote:
>
>
>
> > Hi Sharath,
>
> > Everything looks good from what you described above, as long as you
> > have the following 2 lines in your gadget ModulePrefs, withhttp://example.com/hello/replacedwith the location where your
> > > > > Sharath- Hide quoted text -
>
> - Show quoted text -

Rohit Ghatol

unread,
Apr 29, 2008, 1:04:29 PM4/29/08
to Orkut Developer Forum
Hi Sharath,

Here is a working example. It has localization for Portuguese also.
I am using pt-BR for lang for Portuguese. The display setting was
changed to Portuguese to test this gadget.

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="__MSG_title__" description="__MSG_description__" >
<Require feature="opensocial-0.7"/>
<Locale messages="http://hosting.gmodules.com/ig/gadgets/file/
117096175175119497472/en_ALL.xml"/>
<Locale lang="en-US" messages="http://hosting.gmodules.com/ig/gadgets/
file/117096175175119497472/en_ALL.xml"/>
<Locale lang="pt-BR" messages="http://hosting.gmodules.com/ig/gadgets/
file/117096175175119497472/pt_ALL.xml"/>
</ModulePrefs>
<Content type="html"><![CDATA[
__MSG_helloworld__

]]></Content>
</Module>

You can try the gadget from the following URL
http://hosting.gmodules.com/ig/gadgets/file/117096175175119497472/i18n.xml

Check it out let me know if this was helpful.

Regards,
Rohit

On Apr 29, 2:38 pm, sharath <sharath2...@gmail.com> wrote:
> Hi Jerome,
>
> Thanks for your reply.
> I tried in the gadget body also but its not working, even tested your
> application;
> I could not see the language change even after changing display
> language setting to estonia.
>
> Regards
> Sharath
>
> On Apr 29, 8:05 am, Jerome <jerome.mou...@gmail.com> wrote:
>
> > Hi Sharath,
>
> > Everything looks good from what you described above, as long as you
> > have the following 2 lines in your gadget ModulePrefs, withhttp://example.com/hello/replacedwith the location where your

sharath

unread,
Apr 29, 2008, 11:13:44 PM4/29/08
to Orkut Developer Forum
Hi Rohit,

Thanks for the reply, its working fine.
Also we discussed earlier about writing into activity stream on
application install.
It would be great if you can let me know the way to achieve it.

Thanks and Regards
Sharath

On Apr 29, 10:04 pm, Rohit Ghatol <rohitsgha...@gmail.com> wrote:
> Hi Sharath,
>
> Here is a working example. It has localization for Portuguese also.
> I am using pt-BR for lang for Portuguese. The display setting was
> changed to Portuguese to test this gadget.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Module>
> <ModulePrefs title="__MSG_title__" description="__MSG_description__" >
> <Require feature="opensocial-0.7"/>
> <Locale messages="http://hosting.gmodules.com/ig/gadgets/file/
> 117096175175119497472/en_ALL.xml"/>
> <Locale lang="en-US" messages="http://hosting.gmodules.com/ig/gadgets/
> file/117096175175119497472/en_ALL.xml"/>
> <Locale lang="pt-BR" messages="http://hosting.gmodules.com/ig/gadgets/
> file/117096175175119497472/pt_ALL.xml"/>
> </ModulePrefs>
> <Content type="html"><![CDATA[
> __MSG_helloworld__
>
> ]]></Content>
> </Module>
>
> You can try the gadget from the following URLhttp://hosting.gmodules.com/ig/gadgets/file/117096175175119497472/i18...
>
> Check it out let me know if this was helpful.
>
> Regards,
> Rohit
>
> On Apr 29, 2:38 pm, sharath <sharath2...@gmail.com> wrote:
>
> > Hi Jerome,
>
> > Thanks for your reply.
> > I tried in the gadget body also but its not working, even tested your
> > application;
> > I could not see the language change even after changing display
> > language setting to estonia.
>
> > Regards
> > Sharath
>
> > On Apr 29, 8:05 am, Jerome <jerome.mou...@gmail.com> wrote:
>
> > > Hi Sharath,
>
> > > Everything looks good from what you described above, as long as you
> > > have the following 2 lines in your gadget ModulePrefs, withhttp://example.com/hello/replacedwiththe location where your

KJ

unread,
May 12, 2008, 6:56:17 PM5/12/08
to Orkut Developer Forum
I think I ran into the same problem. As far as I can tell, the
message bundle won't be used if you only specify the language.
According to the Orkut localization article (1), you should be able to
specify the location of a Portuguese message bundle like this:
<Locale lang="pt" messages="http://example.com/hello/pt_ALL.xml"/>

However, it only seems to work if you specify the country in the lang
attribute, like this:
<Locale lang="pt-BR" messages="http://example.com/hello/pt_ALL.xml""/>

The Google Gadget documentation (2) indicates that the country should
be specified in a separate country attribute, but that doesn't seem to
work either. I could only get Orkut to recognize the message bundle
by specifying both the language and country in the lang attribute.

References:
(1) http://code.google.com/p/opensocial-resources/wiki/OrkutLocalization
(2) http://code.google.com/apis/gadgets/docs/i18n.html#Bundles


On Apr 29, 8:13 pm, sharath <sharath2...@gmail.com> wrote:
> Hi Rohit,
>
> Thanks for the reply, its working fine.
> Also we discussed earlier about writing into activity stream on
> application install.
> It would be great if you can let me know the way to achieve it.
>
> Thanks and Regards
> Sharath
>
> On Apr 29, 10:04 pm, Rohit Ghatol <rohitsgha...@gmail.com> wrote:
>
> > Hi Sharath,
>
> > Here is a working example. It haslocalizationfor Portuguese also.
> > > > have the following 2 lines in your gadget ModulePrefs, withhttp://example.com/hello/replacedwiththelocation where your
> > > > message bundles are hosted:
>
> > > >   <Locale lang="en" messages="http://example.com/hello/en_ALL.xml"/>
> > > >   <Locale lang="pt" messages="http://example.com/hello/pt_ALL.xml"/>
>
> > > > For a quick test, you would be better of trying the __MSG_desc__ in
> > > > your gadget body. I am not sure what the caching policy is for the
> > > > gadget description on the Orkut sandbox.
>
> > > > If you want to see thelocalizationworking for a gadget, check
> > > > > > > I went throughLocalizationwiki and tried few sample programs with

Jason

unread,
May 12, 2008, 7:58:31 PM5/12/08
to Orkut Developer Forum
Yes, Rohit and KJ are absolutely correct. I apologize for the
confusion; the sample I provided on the wiki was incomplete, and I
have corrected it.

Standard gadgets separate the language and country, but it appears
that orkut does not. So instead of passing "en", you must pass "en-
US" (and "pt-BR", etc.).

- Jason

On May 12, 3:56 pm, KJ <kea...@gmail.com> wrote:
> I think I ran into the same problem. As far as I can tell, the
> message bundle won't be used if you only specify the language.
> According to the Orkut localization article (1), you should be able to
> specify the location of a Portuguese message bundle like this:
> <Locale lang="pt" messages="http://example.com/hello/pt_ALL.xml"/>
>
> However, it only seems to work if you specify the country in the lang
> attribute, like this:
> <Locale lang="pt-BR" messages="http://example.com/hello/pt_ALL.xml""/>
>
> The Google Gadget documentation (2) indicates that the country should
> be specified in a separate country attribute, but that doesn't seem to
> work either. I could only get Orkut to recognize the message bundle
> by specifying both the language and country in the lang attribute.
>
> References:
> (1)http://code.google.com/p/opensocial-resources/wiki/OrkutLocalization
> (2)http://code.google.com/apis/gadgets/docs/i18n.html#Bundles
> > > > > have the following 2 lines in your gadget ModulePrefs, withhttp://example.com/hello/replacedwiththelocationwhere your
Reply all
Reply to author
Forward
0 new messages