[wp-trac] [WordPress Trac] #26511: Separate locale for the admin toolbar
WordPress Trac
noreply at wordpress.org
Mon Dec 9 17:20:30 UTC 2013
#26511: Separate locale for the admin toolbar
-----------------------------+-----------------------------
Reporter: johnbillion | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version:
Severity: normal | Keywords:
-----------------------------+-----------------------------
When a site's content is displayed in a language that's different to that
used in the admin area ![1] by using the `locale` filter in
`get_locale()`, the admin toolbar is shown in the language of the content,
not the language of the admin area.
For example, if your content is in French (using `fr_FR` in the `locale`
filter) but your admin area is in English (using `en_US` in the `locale`
filter) then the admin toolbar on the front end will display in French
rather than English.
The value of `get_locale()` is used when the translation files are loaded
at the beginning of the page load, but there's no easy way to subsequently
switch locale and load a different set of translation files later in the
page load (ie. when we output the admin toolbar in the footer).
----
We should introduce a means of changing the locale at any point during the
page load and automatically loading in the relevant translation files,
overriding existing ones. This could then be used to switch the language
before admin-related output on the front end (primarily the admin toolbar,
but potentially any admin-related item).
Leaving this as a feature request for now because I don't have a solution
in mind.
----
![1] Several plugins support this, such as [http://wpml.org/ WPML],
[http://babbleplugin.com/ Babble] and [http://wordpress.org/plugins/admin-
in-english/ Admin in English].
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26511>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list