ampproject / ampproject/amphtml
Consider using standard format for `amp-timeago` locale
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the new feature or change to an existing feature you'd like to see
I would like [`amp-timeago`'s `locale` attribute](https://amp.dev/documentation/components/amp-timeago/?format=websites#locale-(optional)) to use some standardized format, such as [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag) (e.g. zh-CN), as opposed to some custom format (zhCN).
## Describe alternatives you've considered
I've formatted locales to `amp-timeago`'s format in the meantime.
## Additional context
Using a non-standard format causes unnecessary headaches for developers because the default locale libraries of programming languages (e.g. Java) do not support the format out of the box. They support the standard format (and [output it](https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#toLanguageTag--)).
Contributor guide
Research direction
Start with the amp-timeago documentation's locale attribute and compare its current zhCN format with the proposed IETF language-tag format such as zh-CN. Determine the required format change and compatibility expectations; done means the locale interface uses a standardized format without leaving the behavior unspecified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100