Skip to content

How to express expression locale? #426

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

Closed
eemeli opened this issue Jul 15, 2023 · 2 comments
Closed

How to express expression locale? #426

eemeli opened this issue Jul 15, 2023 · 2 comments
Labels
Action-Item Action item assigned by the WG

Comments

@eemeli
Copy link
Collaborator

eemeli commented Jul 15, 2023

Through our past discussions on bidirectional isolation (#28, #315) and formatting to non-string targets (#41, #272), I believe that we've established a consensus on wanting to support output that may mingle content from more than one locale and script. Going further, I think we've established that the resolved locale of an expression may be considered as a separate field of data from its formatted value.

We have not yet, however, established how the locale of an expression should be defined on the input side of things. Is it an option that some functions might have, or should we treat it as something a bit special like the existing ICU and JS Intl formatters do?

If we expect locale to be one option among many, then I think we should clearly establish what its name and value should be. Is it lc, locale, locales or something else? Can its value be something other than a BCP-47 tag? If providing fallback tags, how are they defined and delimited?

If we want to treat locale as somehow special, then we need to use some special syntax for it. Something like this?

{In French, "{|bonjour| @fr}" is a greeting}

If we only establish a common practice for locale as an option, then I think one of our base formatters should be one that allows for an expression such as the above:

{In French, "{|bonjour| :string locale=fr}" is a greeting}
@eemeli eemeli added the Agenda+ Requested for upcoming teleconference label Jul 15, 2023
@aphillips aphillips added Action-Item Action item assigned by the WG and removed Agenda+ Requested for upcoming teleconference labels Aug 14, 2023
@aphillips
Copy link
Member

@eemeli to create PR proposal (see: telecon of 2023-08-14)

@aphillips
Copy link
Member

Close this as done, given that we have both a PR and design doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Action-Item Action item assigned by the WG
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants