Re: agenda+ getTextInfo in Intl

Opening an issue or PR in the proposal repo on this would be best done
sooner rather than later, as the proposal is rather close to reaching
Stage 4. It's not on the agenda for the TC39 meeting that's next week,
but it will quite likely advance at a meeting later this year.

On Thu, Jul 24, 2025 at 5:01 AM Fuqiao Xue <xfq@w3.org> wrote:
>
> Hi Addison,
>
> Yes, what you said makes sense, but I think we can consider adding a note in the spec ( https://tc39.es/proposal-intl-locale-info/#sec-locale-direction ) to make this clearer, and it would be best to explain this in future tutorials for authors.
>
> Fuqiao
>
> > On Jul 23, 2025, at 23:14, Addison Phillips <addisoni18n@gmail.com> wrote:
> >
> > Hi Fuqiao,
> > I've added this to the agenda.
> > I'll pause for a second to supply some nuance. Intl.getTextInfo provides access to (CLDR provided) information about the default direction of a given locale (and thus language). This is useful for cases when the language is known and you want to set the direction of the page or various block elements (see for you example your work on describing mirroring). It is also useful for cases in which metadata is not present, but language is known. We talk about this in string-meta here:
> > > https://www.w3.org/TR/string-meta/#script_subtag We also don't forbid something like this outright. The best practice reads:
> > > Specifications SHOULD NOT allow a string direction to be interpolated from available language metadata unless direction metadata is not available and cannot otherwise be provided.
> > That is, this can be a fallback but should not be the primary mechanism. Metadata always wins.
> > Both or either first-strong heuristics and language metadata can be wrong for any given string. Language/script do *imply* direction and the TextInfo API is useful for things like establish page layout when mirroring is needed. But it is not a substitute for getting the direction for a _specific_ string correct.
> > thanks!
> > Addison
> > On 7/22/2025 5:58 PM, Fuqiao Xue wrote:
> >> I recently discovered this: https://github.com/tc39/proposal-intl-locale-info?tab=readme-ov-file#text-information
> >>
> >> Intl seems to be able to infer the text direction through locale. I remember we kept mentioning "language/script does not imply direction" in the discussion of string meta. Will there be any problem with this?
> >>
> >> ~xfq
> >>
> > --
> > Addison Phillips
> > Chair (W3C Internationalization WG)
> >
> > Internationalization is not a feature.
> > It is an architecture.
>
>

Received on Thursday, 24 July 2025 12:18:30 UTC