Opened 9 years ago
Last modified 8 years ago
#42721 new enhancement
Introduce native language name as a WP_Locale property
| Reported by: | SergeyBiryukov | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | I18N | Version: | 4.9 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)