Merged datasource locale implementation from opal-1.13.x