#36918 closed defect (bug) (fixed)
Multisite: Can't set en_US for language, when creating a new site
| Reported by: | arkimedia | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | I18N | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | administration, multisite |
Description
Problem description:
- I have a multisite where default language is set to Finnish (fi) from the network settings, so that
get_site_option('WPLANG')returns 'fi'.
- I want to create a new site and use en_US as a language.
- If I choose "en_US" from the language chooser in site-new.php,
$_POST['WPLANG']doesn't contain any language.
- Because
$_POST['WPLANG']is empty, no language is passed to the wpmu_create_blog function.
- If no language is passed wpmu_create_blog function, it uses network default, which in this case is 'fi'.
add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
This isn't a problem if the network default language is en_US, but causes problems in localized multisites.
Attachments (1)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hello @arkimedia, thanks for the report. Looks like we need to replace an
empty()check withisset().The language chooser was introduced in [33920].