Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No definition for matching/fallback of language/locale in translations-explainer #70

Closed
aphillips opened this issue Apr 6, 2023 · 3 comments
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. translations

Comments

@aphillips
Copy link

(general)
https://github.com/WICG/manifest-incubations/blob/gh-pages/translations-explainer.md

There is no description for how language tags in the translations block are matched or how locale fallback is handled. At a minimum this should specify RFC4647 (BCP47) "Lookup" matching, although CLDR and Unicode locale matching is probably preferred.

@aphillips aphillips added the i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. label Apr 6, 2023
@loubrett
Copy link
Collaborator

I believe this is solved in the latest proposal (w3c/manifest#1045):

"Language selection is generally done using Unicode’s “lookup” algorithm, meaning that it’s not a simple match. The solution may also be inadequate in that it doesn’t allow specifying per member direction and language override. If individual direction and language is a requirement, then the following object structure is more appropriate:
{ "text": "some text", "dir": "ltr|rtl|auto", "lang": "language-tag" }"

@aphillips
Copy link
Author

Thanks for this. I haven't read #1045 fully yet, but the Unicode lookup algorithm would be appropriate for selecting translations. There are some different considerations about whether to incorporate all translations into a given manifest vs. using separate files (path-based localization), which may be more manageable when the number of localizations grows.

If you think this issue has been addressed, you're welcome to close it (do not remove our tags, which are used for tracking).

@loubrett
Copy link
Collaborator

There was discussion about whether to have translations all in the manifest or in separate files. I think the decision was to keep it all in the one place to begin with for simplicity but to potentially keep the option open to allow using separate files in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. translations
Projects
None yet
Development

No branches or pull requests

3 participants