lang_2_tree function

Convert language object to tree.