Re: [w3c/manifest] [DRAFT—DO NOT MERGE/REVIEW] Add members for localization (PR #1101)

@christianliebel  @dmurph 

I don't think the suffix `_localized` is a proper way for manifest localization and would like to suggestion use html tag.

## HTML Tag method for PWA manifest localization 

Steps: 
1. set a default/base manifest. for example use English based manifest.
2. keep previous manifest document unchanged.
3. add language extension by defining new localized manifest files.

pros: 
1. consistent manifest definition
2. clean and short attribute names
3. no need to add suffix
4. multiple language files for better versioning
5. can localize images, videos as well

cons:
 to be discovered.

## Localization for manifest

1. use tag <manifest> or  use <link>
2. support at lease `dir`, `lang` attributes and should be extensible

`manifest` tag:
```
 <!-- default manifest -->
<manifest href="i18n/manifest.json" />   
<manifest dir = "ltr" lang="fr" href="i18n/manifest.fr.json" />
<manifest dir = "rtl" lang="fr-ca" href="i18n/manifest.fr-ca.json" />
<manifest dir = "auto" lang="en" href="i18n/manifest.en.json" />
<manifest dir = "ltr" lang="en-us" href="i18n/manifest.en-us.json" />
<manifest dir = "ltr" lang="en-us" href="i18n/manifest.en-us.v1.json" />
```

`link` tag:
```
 <!-- default manifest -->
<link rel="manifest"  type="locale"  href="i18n/manifest.json" />
<link rel="manifest"  type="locale" dir = "ltr" lang="fr" href="i18n/manifest.fr.json" />
<link rel="manifest"  type="locale" dir = "rtl" lang="fr-ca" href="i18n/manifest.fr-ca.json" />
<link rel="manifest"  type="locale" dir = "auto" lang="en" href="i18n/manifest.en.json" />
<link rel="manifest"  type="locale" dir = "ltr" lang="en-us" href="i18n/manifest.en-us.json" />
<link rel="manifest"  type="locale" dir = "ltr" lang="en-us" href="i18n/manifest.en-us.v1.json" />
```
4. the default manifest would contain basic features required
5. the extended manifest can have extra features
6.  browsers/OSes parse the base manifest first then parse the extended one according to user's preferences.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/1101#issuecomment-2203113393
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/manifest/pull/1101/c2203113393@github.com>

Received on Tuesday, 2 July 2024 13:07:54 UTC