[ 
https://issues.apache.org/jira/browse/WOOKIE-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13597929#comment-13597929
 ] 

Scott Wilson commented on WOOKIE-405:
-------------------------------------

Sorry just realised that last comment was a bit vague...

When the user platform (e.g. Rave) requests a widget for a user, one of the 
parameters sent to the WidgetInstance API is "locale" (see 
http://wookie.apache.org/docs/api.html)

This will return the rendering information for the widget, using localized 
resources.

You can try this out with the demo. 

1. Drop this widget into /deploy:

https://svn.apache.org/repos/asf/wookie/trunk/src-tests/testdata/localetest.wgt

2. Edit demo/wookie-connector.js, and add line 141:

            postdata = postdata + "&locale=fr";

3. Open /wookie/demo and select the last widget in the list.

4. You should see "Bonjour tout le Monde!"

5. Edit line 141 and put "locale=en-gb-yorks" and refresh the demo page, it 
will now show "Ayup world!".

So if the localization isn't working, the problem may be that the requesting 
platform isn't supplying a "locale" parameter when requesting the widget 
instance for a user.

(Note that we always delegate responsibility for selecting locale to the 
requesting platform - it may use browser properties, or user profiles to do 
this for example)
                
> Widget localization does not work
> ---------------------------------
>
>                 Key: WOOKIE-405
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-405
>             Project: Wookie
>          Issue Type: Bug
>    Affects Versions: 0.13.0
>         Environment: Google Chrome
>            Reporter: Matthias Niederhausen
>
> I have a widget that has a file index.xhtml in the root and also a localized 
> version of that file under /locales/de/index.xhtml
> However, the localized version is never returned to me when I want to use it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to