Opened 9 years ago
Last modified 4 years 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)
Change History (7)
#2
@
6 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
@
6 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?
Thanks.
#4
@
6 years 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
That's not exactly what's used in WordPress core. :) We probably want to mirror what's used on translate.wordpress.org, though.