Re: [w3c/manifest] Add optional `translations` member (#676)

Good question / possible solution. I think this solves a lot of the problems outlined above:

1. It means we have a canonical manifest URL across all languages.
2. It means developers can present all the languages on a static hosting provider (no server-side logic).

I think a problem with that approach is that user agents may wish to download _all_ the languages up front, rather than just the user's preferred language.

The reason a UA would do this is to create a fully internationalized representation of the app in the native OS's preferred form, so that if the user switches OS language, the web app seamlessly changes language as a native app would. For example, on Linux we'd generate a [.desktop file with all the localizations in it](https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html). On Android, we'd generate an [Android Manifest with the same](https://developer.android.com/guide/topics/resources/providing-resources). Thus, switching language doesn't rely on the user agent to realise that the language has changed and fetch the language-alternative resources.

So in order to create, say, the localized .desktop file, we'd have to go and fetch every single `rel=alternate` manifest from the server, creating a lot of requests up front.

Also, would we allow the "alternate" manifests to have just the localized strings (augmenting the base manifest), or would they need to be a complete copy of the entire manifest? That could be a lot more total bytes to download than just having all the strings in one.

An approach we came up with is splitting it into two separate files: the manifest and a separate "translations" file with all the translations. That way, if you need to fetch the manifest for just the icons (or another non-string resource), you don't need to fetch the potentially much larger translations file.

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

Received on Monday, 19 November 2018 03:04:10 UTC