Implement dynamic locale lookup.

Allow dynamic locale lookup and rerendering when the
`application.locale` value changes.