[wp-trac] [WordPress Trac] #47511: Add specific "default settings" for different locales

WordPress Trac noreply at wordpress.org
Tue Jun 11 19:43:02 UTC 2019


#47511: Add specific "default settings" for different locales
-------------------------+-----------------------------
 Reporter:  azaozz       |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  I18N         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------------

Comment (by azaozz):

 Replying to [comment:14 ocean90]:
 > Why should we replace something that works really well with a static
 list that can only be updated by releasing a new WordPress version?

 The problems I see with it is that most of these settings don't apply/are
 redundant for most locales, but are still in the pot file. Another thing
 is that the "global" locale settings like decimal point, date format, etc.
 are well known. They still can be in the pot, but..?

 Another problem is that when these settings are in the po/mo files, they
 are virtually hard-coded and hard to re-use. For example a theme or a
 plugin cannot do `$excerpt_length = intval( _x( '55', 'excerpt_length' )
 );` and get the same value as in core.

 If you think it's best to keep these settings in the pot, lets keep them
 there. However thinking we need to have a "centralized" place to process
 and expose them. That way they can be filtered and sanitized/verified if
 needed (think this will also group them in one place in the pot file which
 will make it easier for translators to set). Also that will make it
 trivial to expose them to themes and plugins and in the REST API.

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


More information about the wp-trac mailing list