if ( !
empty( $_REQUEST['language'
] ) ) { $language =
preg_replace( '/[^a-zA-Z0-9_]/', '',
$_REQUEST['language'
] );
} elseif ( isset( $GLOBALS['wp_local_package'
] ) ) { $language =
$GLOBALS['wp_local_package'
];
}switch ( $step ) { case -1:
if ( wp_can_install_language_pack() &&
empty( $language ) ) { $languages =
wp_get_available_translations();
if ( $languages ) { setup_config_display_header( 'language-chooser'
);
echo '<h1 class="screen-reader-text">Select a default language</h1>';
echo '<form id="setup" method="post" action="?step=0">';
wp_install_language_form( $languages );
echo '</form>';
break;
} } // Deliberately fall through if we can't reach the translations API.
case 0: