WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/18/2014 07:57:21 PM (7 years ago)
Author:
nacin
Message:

Allow a language to be chosen before installing WordPress. First pass.

  • Checks WordPress.org for available languages.
  • In get_locale(), starts using the WPLANG option that has existed in multisite since the MU days.
  • Adds new argument to wp_install() for setting WPLANG.

see #28577.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r28712 r28774  
    3333 * @param null $deprecated Optional. Not used.
    3434 * @param string $user_password Optional. User's chosen password. Will default to a random password.
     35 * @param string $language Optional. Language chosen.
    3536 * @return array Array keys 'url', 'user_id', 'password', 'password_message'.
    3637 */
    37 function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '' ) {
     38function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '', $language = '' ) {
    3839    if ( !empty( $deprecated ) )
    3940        _deprecated_argument( __FUNCTION__, '2.6' );
     
    4849    update_option('admin_email', $user_email);
    4950    update_option('blog_public', $public);
     51
     52    if ( $language ) {
     53        update_option( 'WPLANG', $language );
     54    }
    5055
    5156    $guessurl = wp_guess_url();
Note: See TracChangeset for help on using the changeset viewer.