Update IndexController.php

Trim whitespace from individual $selectedLanguages values. Otherwise only the first language is recognized.