[wp-trac] [WordPress Trac] #26511: Introduce a locale-switching function

WordPress Trac noreply at wordpress.org
Tue May 31 01:04:20 UTC 2016


#26511: Introduce a locale-switching function
------------------------------------+------------------
 Reporter:  johnbillion             |       Owner:
     Type:  feature request         |      Status:  new
 Priority:  normal                  |   Milestone:  4.6
Component:  I18N                    |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------

Comment (by tloureiro):

 - In our unit test, when running switch_to_locale(), the global $l10n was
 not loaded yet. So we had to run a dummy load_text_domain() before making
 use of the switcher class.
 - switch_to_locale now returns the locale if it runs successfully or false
 otherwise

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26511#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list