[wp-trac] [WordPress Trac] #49263: Switching blog doesn't switch locale

WordPress Trac noreply at wordpress.org
Tue Jan 21 20:23:51 UTC 2020


#49263: Switching blog doesn't switch locale
-------------------------------------------+------------------------------
 Reporter:  iandunn                        |       Owner:  (none)
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  I18N                           |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  2nd-opinion reporter-feedback  |     Focuses:  multisite
-------------------------------------------+------------------------------
Changes (by johnjamesjacoby):

 * keywords:   => 2nd-opinion reporter-feedback


Comment:

 Also related to #39210 (which I found to have more conversation &
 context.)

 At a cursory, this probably would use `_load_textdomain_just_in_time()`
 but then would suffer from the same relative performance issues.

 It makes me (once again) wish we had a base Switcher class, along with a
 way to register what happens when something is switched where. There are
 places where switching between sites (or users/posts/locales eventually)
 needs to be really speedy (like the top toolbar menu getting Site Names)
 but then other places where switching would expect for things like
 translations to be properly loaded up.

 Today, I'm inclined to suggest that the best solution is also the worst
 one, which is to wait until a multisite specific bug appears (like an
 email getting delivered in the wrong locale or something) and
 intentionally hooking in the locale change as needed instead of doing it
 always and unhooking for performance benefits.

 If/when locale switching can be cached nicely and super speedy (and it's
 viable for more broad implementation across core) then we could revisit
 this specific issue and give it another try?

 Thoughts?

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


More information about the wp-trac mailing list