[wp-trac] [WordPress Trac] #49971: Add get_admin_locale() that is separate from WPLANG / get_locale() / get_user_locale()

WordPress Trac noreply at wordpress.org
Tue May 16 10:35:07 UTC 2023


#49971: Add get_admin_locale() that is separate from WPLANG / get_locale() /
get_user_locale()
-------------------------+-------------------------------------------------
 Reporter:  apedog       |       Owner:  (none)
     Type:  feature      |      Status:  new
  request                |
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  I18N         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  ui, accessibility, rtl,
                         |  administration
-------------------------+-------------------------------------------------

Comment (by Marc4):

 I can't understand what sense it would make for a user to have three
 languages active at the same time as you indicate in your example. So I
 can't imagine what would happen in that situation. If you are referring to
 two or more different people, I deal with it below.

 If you mean that it makes no sense to have "Site", "Dashboard" and "User"
 languages, I agree with you, there should only be "Site" and "Dashboard",
 but now we get into the uaurio roles and the languages associated with
 them.

 Currently, a user who does not have an administrator role, can only select
 in the configuration section of his user, the languages that the
 administrator has previously registered on the website. The language
 selected by this non-admin user will be his personal "Dashboard Language",
 but he cannot change the front-end language. The "Site Language" option is
 being hidden from this user, because he does not have access to
 "Settings".

 In order not to have three language options, in the case of an
 administrator user, he would simply not have the option to change the
 language of his user, since this language will be selected in "Settings >
 General". This is where the ticket image proposal would come in
 https://core.trac.wordpress.org/ticket/58105

 Replying to [comment:11 swissspidy]:
 > Yes I see where you added the language selector, thanks.
 >
 > My question is just: when you select the language, what happens? What is
 now displayed in this new language?
 >
 > Right now the user language is used for the admin, the site language for
 the frontend.
 >
 > Is the suggestion that this new field would be used for the admin _as
 long as the user has not changed their language_?
 >
 > That sounds a bit confusing to me, as per my example above: Let's say my
 site language is es_ES and my user language is de_DE. Now I change the
 admin language to fr_FR. What is now displayed in fr_FR?

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


More information about the wp-trac mailing list