Skip to content

Commit 76294d8

Browse files
Formalize Internationalization appendix as Internationalization Considerations and clarify UA localization options (#1234)
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
1 parent b74c08a commit 76294d8

1 file changed

Lines changed: 50 additions & 9 deletions

File tree

index.html

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3610,7 +3610,7 @@ <h2>
36103610
<section id="internationalization" class="appendix informative" data-cite=
36113611
"i18n-glossary">
36123612
<h2>
3613-
Internationalization
3613+
Internationalization Considerations
36143614
</h2>
36153615
<p>
36163616
It is expected that authors will localize the content of a manifest by
@@ -3621,11 +3621,46 @@ <h2>
36213621
Localized values in the manifest:
36223622
</dt>
36233623
<dd>
3624-
Authors can provide [=localized values=] for the [=localizable
3625-
members=] of the [=manifest=]. The user agent passes all localized
3626-
values to the host operating system. When the user changes the
3627-
[=locale=] at the OS level, the OS can present the updated localized
3628-
values of the [=installed web application=].
3624+
<p>
3625+
Authors can provide [=localized values=] for the [=localizable
3626+
members=] of the [=manifest=] using the corresponding `*_localized`
3627+
members (e.g., `name_localized`). Individual localized entries can
3628+
be a [=string=] or a [=localized text object=]. A [=localized text
3629+
object=] can specify its own natural language and text-direction
3630+
metadata using its [=manifest/*_localized/lang=] and
3631+
[=manifest/*_localized/dir=] properties, overriding any defaults
3632+
provided by the manifest-wide [=manifest/lang=] and
3633+
[=manifest/dir=] members.
3634+
</p>
3635+
<p>
3636+
User agents MAY handle localized values in one of the following
3637+
ways:
3638+
</p>
3639+
<dl>
3640+
<dt>
3641+
Pass-through localization:
3642+
</dt>
3643+
<dd>
3644+
The user agent passes all localized values (the entire language
3645+
map) to the host operating system during installation. When the
3646+
user changes their preferred language at the OS level, the host
3647+
OS can immediately present the updated localized values (e.g.,
3648+
the application name) without requiring the user agent to run.
3649+
</dd>
3650+
<dt>
3651+
On-demand/update evaluation:
3652+
</dt>
3653+
<dd>
3654+
The user agent evaluates the localized values at parse time based
3655+
on the user's current locale. When the user changes the system
3656+
language, the app properties do not update immediately. Instead,
3657+
they are updated when the user next visits the application or
3658+
during a background update check, allowing the user agent to
3659+
inspect and potentially request user acknowledgment for
3660+
security-sensitive changes (such as a name change) before
3661+
updating the host OS.
3662+
</dd>
3663+
</dl>
36293664
</dd>
36303665
<dt>
36313666
Dynamically setting the language:
@@ -3637,14 +3672,20 @@ <h2>
36373672
preference (e.g., using a URL like "manifest.php?lang=fr").
36383673
</dd>
36393674
<dt>
3640-
Using content-negotiation, or geotargeting, etc. on the server:
3675+
Using server-side language negotiation or geotargeting:
36413676
</dt>
36423677
<dd>
36433678
The server that hosts the web application could attempt to
36443679
predetermine the end-user's language by using <a href=
36453680
"https://en.wikipedia.org/wiki/Geotargeting">geotargeting</a> or by
3646-
using content negotiation (e.g., using an HTTP "`Accept-Language`"
3647-
header [[RFC9110]], or even a custom HTTP header).
3681+
performing [=language negotiation=] (e.g., via the HTTP
3682+
"`Accept-Language`" header [[RFC9110]], or a custom HTTP header). For
3683+
more details and best practices, see the W3C Internationalization
3684+
articles <a href=
3685+
"https://www.w3.org/International/questions/qa-accept-lang-locales">Accept-Language
3686+
used for locale setting</a> and <a href=
3687+
"https://www.w3.org/International/questions/qa-http-and-lang">HTTP
3688+
headers, meta elements and language information</a>.
36483689
</dd>
36493690
</dl>
36503691
<p>

0 commit comments

Comments
 (0)