Adds support for Locale as an object field.