idpui taglib and locale change

27 views
Skip to first unread message

Etienne Dysli

unread,
Aug 12, 2011, 11:18:41 AM8/12/11
to Shib Dev
Hi everyone,

I'm looking at the new idpui taglib. It takes into account the browser's
preference HttpServletRequest.getLocale().getLanguage(), that's nice. :)
But... you can't change that locale from the JSP (it's read-only) and I
find the result when there is no mdui info with the exact same language
isn't so nice.

Being in a multi-language country, I've put links on my login.jsp so
that the user can choose another language than the default one (which
comes from HttpServletRequest.getLocale().getLanguage() as well). The
link's resulting request parameter is then used with <fmt:setLocale> to
load translations.

Is there a way to influence the idpui taglib's locale selection with
that fmt:setLocale change? So that if the user reloads the page with
another language, then the corresponding mdui elements are fetched.

Alternatively, instead of searching only for the first language match,
the taglib could iterate through the other available locales given by
HttpServletRequest.getLocales() to find a mdui element with the matching
xml:lang attribute. I'd rather see an English or German description of a
SP rather than just the hostname because there is no French description.

Regards,
Etienne

signature.asc

Chad La Joie

unread,
Aug 12, 2011, 11:28:18 AM8/12/11
to Shib Dev
There is no way to feed in a locale to the UI tags, we can only rely
on what the browser gives us. That said I do agree that the tags
should iterate over all locales given by the browser until it finds a
match before failing over to the default value. So I'd recommend
filing a RFE for that.

Note, the information used by the UI tags is just in metadata and the
actually EntityDescriptor is available int he JSP page so you can
write a custom JSP to do whatever it is you want with that info
including offering a language selector on the page.

> --
> To unsubscribe from this list send an email to dev-uns...@shibboleth.net
>

--
Chad La Joie
www.itumi.biz
trusted identities, delivered
--
To unsubscribe from this list send an email to dev-uns...@shibboleth.net

Reply all
Reply to author
Forward
0 new messages