idpui taglib and locale change
Etienne Dysli
etienne.dysli at unil.ch
Fri Aug 12 16:18:41 BST 2011
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
Url : http://shibboleth.net/pipermail/dev/attachments/20110812/b0d4cf28/attachment.bin
More information about the dev
mailing list