Make WordPress Core

Opened 7 years ago

Last modified 5 years ago

#42721 new enhancement

Introduce native language name as a WP_Locale property

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.9
Component: I18N Keywords:
Focuses: Cc:


At the moment, displaying the current locale's native name is only possible by reusing wp_get_available_translations(), which performs an external request to the translations API and stores the result in a transient.

It would be easier if the native name was available as a WP_Locale instance property.

Use case: [41198] introduced 50+ strings with language names for MediaElement.js. Looking at the code, they are used as subtitle track labels, unless the track has its own label.

This is only a subset of all locales supported by WordPress. If the goal is to make sure the current locale's name can be used as a subtitle track label, it doesn't make much sense to translate the whole list to 100+ languages.

Change History (3)

This ticket was mentioned in Slack in #core-i18n by ramonopoly. View the logs.

6 years ago

#2 @pento
6 years ago

  • Milestone changed from 5.0 to 5.1

#3 @pento
5 years ago

  • Milestone changed from 5.1 to Future Release
Note: See TracTickets for help on using tickets.