#36918 closed defect (bug) (fixed)
Multisite: Can't set en_US for language, when creating a new site
Reported by: | arkimedia | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | I18N | Keywords: | has-patch has-unit-tests |
Focuses: | administration, multisite | Cc: |
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)
#1
@
8 years ago
- Component changed from General to I18N
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Version changed from 4.5.2 to 4.4
#3
@
8 years ago
- Keywords has-patch has-unit-tests added; needs-patch removed
- Milestone changed from Future Release to 4.7
Note: See
TracTickets for help on using
tickets.
Hello @arkimedia, thanks for the report. Looks like we need to replace an
empty()
check withisset()
.The language chooser was introduced in [33920].