Changes between Initial Version and Version 1 of Ticket #47511, comment 5
- Timestamp:
- 06/09/2019 07:05:57 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #47511, comment 5
initial v1 7 7 The way I see it is to have the "current defaults" in an array, and then override only what's needed/different for each locale. For several locales we won't need to change anything, and for most we will only change 1-2 things (as far as I see). Then wrap this into a function similar to `get_bloginfo()` which will make these settings filterable and easy to use (of course all of this will be in `WP_Locale`). 8 8 9 This would be much better/easier than the current things like:9 This would be much better/easier than the [https://core.trac.wordpress.org/browser/tags/5.2/src/wp-includes/class-wp-locale.php#L372 current things like]: 10 10 {{{ 11 /* translators: localized date format, see https://secure.php.net/date */ 12 __( 'F j, Y' ); 13 /* translators: localized time format, see https://secure.php.net/date */ 14 __( 'g:i a' ); 15 ... 11 /** 12 * Register date/time format strings for general POT. 13 * 14 * Private, unused method to add some date/time formats translated 15 * on wp-admin/options-general.php to the general POT that would 16 * otherwise be added to the admin POT. 17 * 18 * @since 3.6.0 19 */ 20 public function _strings_for_pot() { 21 /* translators: localized date format, see https://secure.php.net/date */ 22 __( 'F j, Y' ); 23 /* translators: localized time format, see https://secure.php.net/date */ 24 __( 'g:i a' ); 25 ... 16 26 }}} 17 27