- From: Addison Phillips <notifications@github.com>
- Date: Mon, 04 Sep 2023 09:02:21 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/1045/1705488133@github.com>
@marcoscaceres sent I18N a pointer to this issue today and I'm going to spend a moment to comment on it in part because it is similar to comments we're engaged with with the verified credentials folks. There are two potential problems to organizing localization as proposed here. First, if a given manifest omits localizations, the core document has natural language strings that do not have language or direction metadata. In a number of examples, these consist of words that are both program internal values (which should be immutable and non-localized) and *also* the display name, e.g.: ``` preferred_color_scheme: dark <- both a keyword and the display name for the color scheme ``` Ideally the core manifest would have display names separate from enumerated program internal values. It may be useful to allow a manifest to declare a default language and direction that applies to any natural language string not overridden locally, e.g.: ``` "language": "en", "dir": "ltr", "short_name": "My App", <- English, LTR ... etc... ``` The second problem I want to call out is the inconvenience of the localization structures found in JSON currently. Language maps don't allow direction metadata, but a list of objects makes it harder to implement selection because every one of the localization entries has to be parsed when matching. Using a "lookup" matcher generally works best when localized values are keyed by language: ``` "short_name.localizations": [ "en": [ value: "My App, hey!", dir: "ltr"], "en-GB": [ value: "My App, eh wut?", dir: "ltr"], "fr": [ ... ], "ar": [ value: "...", dir: "rtl" ] } ``` Lacking a common structure for this in e.g. JSON-LD and other similar schemes means everyone will invent it over or try to adapt inconvenient solutions that omit direction or require additional processing. Look forward to chatting in Seville. ``` -- Reply to this email directly or view it on GitHub: https://github.com/w3c/manifest/issues/1045#issuecomment-1705488133 You are receiving this because you are subscribed to this thread. Message ID: <w3c/manifest/issues/1045/1705488133@github.com>
Received on Monday, 4 September 2023 16:02:28 UTC