How to create language object from language string (e.g. 'en')?
Use language_list() function:

&lt;?php

function get_langugage_object($language) {
  $installed_languages = language_list();
  return $installed_languages[$language];
}

?&gt;