Moved language routing logic