WordPress.org

Making WordPress.org

Opened 4 years ago

Last modified 6 weeks ago

#1156 new enhancement

ISO Language Code Tag to Improve API

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

Description

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 6 weeks ago.
Extra fields in the API for YouTube (and other) integration

Download all attachments as: .zip

Change History (5)

#1 @samuelsidler
4 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
10 months 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
7 months 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?

Thanks.

@casiepa
6 weeks ago

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

#4 @casiepa
6 weeks 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.