On Fri, Jul 11, 2025 at 7:26 AM Collin Funk <collin.funk1@xxxxxxxxx> wrote: > I think the correct behavior would be to accept any values, or convert > the current locale to the closest BCP 47 language tag. On some Linux systems, not all BCP languages are supported. Not all Linux distributions generate all the locales, and musl doesn't even support locales. Converting to the closest BCP 47 language alone does not ensure the locale is valid. Not to mention the tricky heuristics of language matching (pt_PT or pt_BR if LANGUAGE is pt?). > But as you mentioned converting them would require a database of all > tags... Hardcoding all the locale names in the code should be fine, I guess? Though the problem of filtering out locales unsupported by glibc is more troublesome.