idpui taglib and locale change
Chad La Joie
lajoie at itumi.biz
Fri Aug 12 16:28:18 BST 2011
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.
On Fri, Aug 12, 2011 at 11:18, Etienne Dysli <etienne.dysli at unil.ch> wrote:
> 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
>
>
> --
> To unsubscribe from this list send an email to dev-unsubscribe at shibboleth.net
>
--
Chad La Joie
www.itumi.biz
trusted identities, delivered
More information about the dev
mailing list