-
Notifications
You must be signed in to change notification settings - Fork 162
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
multiple natural language text fields share language/direction [I18N] #968
Comments
Related: #676 |
I think this issue deserves fully support by the manifest spec so that one manifest can serve multiple languages. However, I wonder if, after #446 this is possible to handle through manifest updating. Manifests are usually served on already localized websites, so the manifest itself can be differentially-served based on the language. If the user changes their language, the linked manifest would change, and the spec would allow any of these natural language text fields to be updated. Perhaps this is good enough support for CR? |
@dmurph I feel like |
That proposal seems pretty nice to me. |
Yes, I looked at the proposal. If I understand correctly, the problem solved by that proposal is different from the problem to be solved in this issue. You can read my explanation for the miniapp folks in w3c/miniapp-manifest#12 (comment) |
I totally understand where you're coming from. We talked a bit about string replacement previously, which is how I've handled translations in the past, but the main issue is that it breaks backwards compatibility. I've also gotten pushback on maintaining separate translation files, so I suspect that will be a hard sell too. |
According to my understanding (please correct me if I'm wrong):
Both approaches intend to solve the problem of translation/localization, not the problem of the language and direction metadata of the strings itself. There is no way to override the language and direction for a specific natural language text field. See the "String metadata" part of w3c/miniapp-manifest#12 (comment) . |
See also https://www.w3.org/TR/2020/REC-json-ld11-20200716/#example-77-overriding-default-language-and-default-base-direction-using-an-expanded-value for an example in JSON-LD. |
@xfq Sorry, I got distracted by the string replacements in that section you linked to. The Do you have specific use cases in mind where individual fields would need to exist in different languages? It might help to start with that. The external files option is a follow-on proposal, but is not likely to land anytime soon (if it ever does). |
Actually, I take that back. You might be able to do something like {
"dir": "ltr",
"lang": "sw"
"name": "Tembo",
"translations": {
"en": {
"description": "Never forget where you put your keys with our revolutionary technology."
}
}
} We need to define what happens when a key exists in |
@xfq Would the above solution work for your use case? |
I don't think this works for our use cases. We have a document dedicated to string metadata related use cases: https://www.w3.org/International/articles/lang-bidi-use-cases/ |
@xfq Thanks for that. I totally feel for you on the problem. Yeah, That’s going to be a really hard nut to crack in the Manifest, given that we only support text strings. Are you looking to resolve this within the JavaScript As this is not a problem we are going to solve in the Manifest spec and we are uncertain when a workable solution is likely to land, I am going to mark this as deferred. When a solution is created, I suspect we’ll update the Internationalization section. Please ping this thread again when there is a solution for JavaScript/JSON. |
The state of this is:
|
https://www.w3.org/TR/appmanifest/#web-application-manifest
The manifest provides a number of members. These start with
dir
andlang
, but the subsequent natural language members don't appear to have their owndir
/lang
associated with them . It may not be possible to produce a manifest that has different language or base direction strings in it. The members in question are:name
short_name
name
short_name
description
Mirror issue in the MiniApps Manifest: w3c/miniapp-manifest#4
I would be happy to organize a joint meeting between WAM and MAM folks to find a common solution (and maybe with the i18n WG if needed) per https://www.w3.org/2021/04/01-miniapp-minutes.html (and https://www.w3.org/2020/08/26-manifest-minutes.html)
See also https://w3c.github.io/pub-manifest/#manifest-lang-dir-local
The text was updated successfully, but these errors were encountered: