[wp-trac] [WordPress Trac] #26511: Introduce a locale-switching function
WordPress Trac
noreply at wordpress.org
Wed Sep 21 14:14:51 UTC 2016
#26511: Introduce a locale-switching function
--------------------------------------+------------------------
Reporter: johnbillion | Owner:
Type: feature request | Status: reviewing
Priority: normal | Milestone: 4.7
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------
Comment (by ocean90):
[attachment:26511.4.diff] looks good so far. Note that is uses
`get_user_locale()` from #29783 which shouldn't be part of the initial
commit. (Depends on which ticket lands first.)
* Is there a reason why `$GLOBALS['wp_locale'] = new WP_Locale();` happens
after the actions?
* The docs for `WP_Locale_Switcher` can be improved:
* 'Class for switching locales.' => 'Core class used for switching
locales.'
* 'Locale switcher object.' => 'Locale API: WP_Locale_Switcher class'
* Is the `get_translations_for_domain()` call in
`WP_Locale_Switcher::load_translations()` required? Tests are still
passing when removing the line.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26511#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list