Add predicate sorting, as well as an example of locale-based sorting.