Fix #3251

Using ksort now, instead of prefilling the commonlanguages array.
Merge pull request #3257 from owncloud/fix_3251

Fix 3251