Merged datasource locale implementation from magma-1.5.x