optional collation

Since my local php copy does not have the Collator class, I need this
routine so that I can use Preference.  Kindly check if this works when
Collator class exist.

Change-Id: I1843c3b0968484da5a6cfacf039e91583824a51e
Merge "optional collation"