-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build a better time zone selector (and engineer out continents-cities.php) #50
Comments
With the time zone names committed in #80, we can start playing around here. For example, if we replaced continents-cities.php in language packs with the relevant CLDR timeZoneNames.json file, this function -- written here as a part of the WP_CLDR class -- could with some tweaking replace core's
While we're at it though, seems like we should be able to use some combination of country, browser time zone offset, and the user's locale to give users a simpler and more targeted set of time zone choices. |
WordPress core currently includes a hack around time zones, a php file called continents-cities.php. This isn't used by any code but includes a list of ~500 geographic names in English wrapped in
__()
so they get into GlotPress. Language packs include localized versions of this file. Core's time zone selector then gets a list of time zone IDs from PHP'stimezone_identifiers_list()
, does some parsing, generates a drop down list, and uses those localized strings for display names.A couple issues here:
CLDR data could offer a better way.
The text was updated successfully, but these errors were encountered: