This is from inspection of the code not from testing.
I think that AttributeDisplayNameFunction is using the server's locale to render the attribute name, rather than the list of acceptable languages pushed by the browser.
We should consider changing this to function rather more like the RPUIContext (which takes both the browser languages and the fallback languages into conisderation).
It appears that this is all configured inside system, but the function itself is inside idp-consent (and hence is implied -api). So I suspect we need another implementation to do the client-aware work.
Meantime I'll document his velocity property as being a Function<IdpAttribute, String> which gives us wiggle room.