New sortlocale handling
Merged from dev