How to set the default language in code? I want to set the default language during install to something other than English.
How?
A profile install hook that enables and sets Swedish.

/**
 * Implements hook_install().
 */
function hook_install() {
  // Enable swedish.
  locale_add_language('sv');
  $languages = language_list();
  variable_set('language_default', $languages['sv']);
}


Since language_default is a variable, it could also be Strongarm managed.