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-includes/l10n.php

    r28083 r28774  
    2727    global $locale;
    2828
    29     if ( isset( $locale ) )
     29    if ( isset( $locale ) ) {
    3030        /**
    3131         * Filter WordPress install's locale ID.
     
    3636         */
    3737        return apply_filters( 'locale', $locale );
     38    }
    3839
    3940    // WPLANG is defined in wp-config.
     
    4950        if ( $ms_locale !== false )
    5051            $locale = $ms_locale;
     52    } elseif ( ! defined( 'WP_INSTALLING' ) ) {
     53        $db_locale = get_option( 'WPLANG' );
     54        if ( $db_locale ) {
     55            $locale = $db_locale;
     56        }
    5157    }
    5258
Note: See TracChangeset for help on using the changeset viewer.