ตอบกลับ: [blink-dev] Intent to Implement and Ship: Accept-Language Headers language expansion

8 views
Skip to first unread message

wisanthama

unread,
Aug 25, 2017, 2:20:19 AM8/25/17
to Claudio Magni, blink-dev, Jon Napper, Yana Yushkina, Renjie Liu, Dru Knox




ส่งจากสมาร์ทโฟน Samsung Galaxy ของฉัน

-------- ข้อความดั้งเดิม --------
จาก: 'Claudio Magni' via blink-dev <blin...@chromium.org>
วัน​ที่: 25/8/17 12:04 (GMT+07:00)
ถึง: blink-dev <blin...@chromium.org>
Cc: Jon Napper <nap...@google.com>, Yana Yushkina <yyus...@google.com>, Renjie Liu <renj...@google.com>, Dru Knox <dk...@google.com>
เรื่อง: [blink-dev] Intent to Implement and Ship: Accept-Language Headers language expansion

Contact emails

claudi...@google.com, yyus...@google.com


Spec

See design doc.

The HTTP headers spec is here.


Summary

We want to change how Chrome generates the Accept-Language HTTP headers. As websites tend to only accept languages without region (i.e. “en” vs “en-AU”), the user could receive websites in an unexpected language. We plan to add the base language in the correct position so that users receive webpages in their preferred language.


Motivation

Some users have a bad user experience when they receive a website that is not in their preferred language, despite having set their language preferences correctly.


Interoperability and Compatibility Risk

Each browser has a different behavior regarding Accept-Language headers.

  • Safari: only the top language is used for the header. The header always contains a single language and it does not fallback to the base language from a regional one. However the set of languages that can be sent in the header is limited and I wasn't able to figure out the exact logic that governs it. For example, English languages are sent as "en", while Spanish-Argentina is passed as "es-es".
  • Firefox: the header matches exactly the language list in the user preferences. Nothing is added or moved, thus they do not perform the expansion that we are suggesting in this design.
  • Edge: given that in the user preferences they do not allow a base language without at least a region associated to it, they add the base language after the last occurrence of any corresponding regional language. Out of all the browsers, their behavior is the closest to the one we want to implement, with just small differences in a few edge cases.
  • Opera: did not test.

This page has a good summary of the different behaviors.

Our change would be mostly in line with Edge browser.


Ongoing technical constraints

None.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Is this feature fully tested by web-platform-tests?

No.

These tests do not apply since the spec is implemented differently across browsers. Refer to the Interoperability section above.


OWP launch tracking bug

http://crbug/737232


Feature dashboard

N/A


Requesting approval to ship?

Yes



Note:

I have previously sent a similar "Intent to Implement" email for this change. You can view the discussion here.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2BQCODp%2BtubkybLVV0mMDukAndg7Gt6wzgVndf3jtPYMXnwbEA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages