Skip to content

Should we include translation with an unknown source language? #1

@domenic

Description

@domenic

This is an open question discussed in this part of the explainer. The current proposal includes the ability to translate without specifying a source language, in which case the return type of translate() and translateStreaming() will change to include the detected language.

The alternative API is to require the web developer to specify the source language. If they don't know it, they can use the language detection part of the API first, and then separately use the translation API.

Both approaches have some precedents:

One factor to note is that bundling together language detection with translation requires the implementation to make a single best-guess at the source language. Whereas, separating the steps allows the detection step to return multiple possibilities, and then the developer can choose what to do with that information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions