Sorting Collections Alphabetically in the Outliner I have numerous objects categories that I used to organize in Groups through a script in Blender 2.79.  

I'm now trying to switch to blender 2.8 and use collections, but in the outliner the only listing order that I can get is by their creation. There is an option "sort alphabetically" but it only works for objects. In Blender 2.79 Groups were listed in alphabetical order, I don't understand why this has been changed.  

Anyway, does anyone have an idea on how to circumvent this problem? Would it be possible with a script? There is no way I can switch to Blender 2.8 if I don't fix this issue!
Thank you very much. 

Federico
Fully recursive and optionally case-sensitive:

import bpy

def sort_collection(collection, case = False):

  if collection.children is None: return

  children = sorted (
    collection.children, 
    key = lambda c: c.name if case else c.name.lower()
  )

  for child in children:  
    collection.children.unlink(child)
    collection.children.link(child)
    sort_collection(child)

# case_sensitive sort, (default is False)
case_sensitive = True

for scene in bpy.data.scenes:
    sort_collection(scene.collection, case_sensitive)