Making WordPress.org

Opened 5 years ago

Last modified 20 months ago

#1156 new enhancement

ISO Language Code Tag to Improve API

Reported by: A2BCool Owned by:
Milestone: Priority: normal
Component: WordPress.tv Keywords:


While working on the WPTV plugin, I noticed that there is no tie in between the language preference set by the user and the available language tag in the WordPress.tv post_meta.

To better synchronize language preferences in WP with how WordPress.tv stores languages of videos a language_code tag would benefit the API.

ISO 639-3 codes would be preferable; however, using the cultural codes that are used within WP core would be simplest. example cultural code: en_us, where the first two characters(en) represent the language and the second two represent the country(us).

Attachments (1)

WPTV language.pdf (109.1 KB) - added by casiepa 20 months ago.
Extra fields in the API for YouTube (and other) integration

Download all attachments as: .zip

Change History (5)

#1 @samuelsidler
5 years ago

That's not exactly what's used in WordPress core. :) We probably want to mirror what's used on translate.wordpress.org, though.

#2 @obenland
2 years ago

I'm not sure I understand what's being asked here. Is the goal to show show sessions in the visitor's language before showing English sessions?

#3 @casiepa
2 years ago

Hi @A2BCool,

Could you please clarify this request? What API do you refer to and what exactly would you expect to happen with the language code?


20 months ago

Extra fields in the API for YouTube (and other) integration

#4 @casiepa
20 months ago

https://wptv.wordpress.com/wp-admin/edit-tags.php?taxonomy=language is only allowing the possibility to enter a name for the language.

A WPTV admin would still create the language, but then a dropdown from https://translate.wordpress.org/api/languages could be used to have the language codes. Fields lang_code_iso_639_1 and wp_locale would be useful.

For the link with YouTube, the lang_code_iso_639_1 is needed as an extra field in the API for the videos on https://wordpress.tv/api/videos.json to sync them.

For possible further integration both fields should be visible in https://wordpress.tv/api/languages.json

Note: See TracTickets for help on using tickets.