Some TODOs left, but the core is there. Thanks to Peter1138 for code, advice and patience And to Patchman for letting us define a lot of langids :)