Re: [w3c/manifest] Add members for localization (PR #1101)

@jcayzac commented on this pull request.



> +              `lang` (optional)
+            </dt>
+            <dd>
+              A [=language tag=].
+            </dd>
+            <dt>
+              `dir` (optional)
+            </dt>
+            <dd>
+              The [=text-direction=].
+            </dd>
+          </dl>
+          <p>
+            When a plain [=string=] is used, or when the `lang` or `dir`
+            members are omitted, `lang` falls back the [=language tag=] of the
+            [=language map=] key, and `dir` falls back to the [=manifest/dir=]

I think this means that, for instance, in `"fr": {"value": "Sélecteur de Couleur", "dir": "ltr"}` the `lang` value is `"fr"`. But I agree it could be made clearer.

I'm not sure I understand why we need both the key of the map and this `lang` value. `"fr": {"value": "Sélecteur de Couleur", "lang": "fr-CA", "dir": "ltr"}` could just be `"fr-CA": {"value": "Sélecteur de Couleur", "dir": "ltr"}` no?

I would see some value in allowing multiple values, on the other hand. This would allow having a single entry for multiple variants of a language, e.g. `"fr-others": {"value": "Sélecteur de Couleur", "lang": "fr-CA, fr-BE", "dir": "ltr"}`

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

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

Received on Saturday, 13 July 2024 03:05:50 UTC