Simplify lang management and make it working in compile mode