[wp-trac] [WordPress Trac] #29456: Deprecating WPLANG constant is a regression
WordPress Trac
noreply at wordpress.org
Mon Sep 1 18:30:01 UTC 2014
#29456: Deprecating WPLANG constant is a regression
--------------------------+-----------------------------
Reporter: tenpura | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Current implementation for 4.0, adding new languages is not automatic. To
get a new language to show up in the language switcher in the admin area,
users have to manually copy language files to wp-content/languages
directory.
See: #15677, http://make.wordpress.org/polyglots/2014/08/29/let-me-share-
some-issues-about-4-0-language/
Seemingly this problem could be solved if the priority of the WPLANG
constant is treated the same as WP 3.9.x.
I made a quick testing plugin for this demo, so anyone who's interested,
please try the following steps:
1. Copy the wplang-test.php into your 4.0-RCx wp-content/mu-plugins
directory.
2. Set a newly adding locale to the WPLANG constant in wp-config.php.
3. Go to Dashboard > Updates, then click "Update Translations" button.
4. Core starts downloading disired new language files automatically.
5. In Settings > General > Site Language, you will see new language is
selected (and locked).
6. Removing WPLANG constant from wp-config.php unlocks the language
switcher.
I don't see anything wrong with this flow and now my question is why the
WPLANG constant is deprecated in 4.0. Is there any particular reason it
should be deprecated?
The advantage of having the WPLANG constant the same as before in 4.0 is
that it gives us a simple locale locking capability. The language switcher
is cool and fancy new functionality, but in reality most people rarely
change his/her blog locale once their blog start running. In most cases
people don't want to change the locale settings of a production site
accidentaly by his/her clients or even by themselves, so they could lock
it with the WPLANG constant.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29456>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list