Skip to content

Default app locales should derive from "Preferred Languages" on Windows #112717

@yaakovschectman

Description

@yaakovschectman

Currently, Flutter on Windows determines the default locales to assign to the platform configuration based on the value obtained by calling GetThreadPreferredUILanguages. This does not necessarily return the actual languages listed in the "Preferred Languages" setting. We should get the full list of preferred languages to use for application locales.

We can achieve this by querying the registry with

RegGetValueA(HKEY_CURRENT_USER, "Control panel\\International\\User Profile", "Languages", RRF_RT_REG_MULTI_SZ, NULL, str_buffer.data(), &buffer_size)

If this fails, we can fallback to the current implementation.

Metadata

Metadata

Labels

a: desktopRunning on desktopa: internationalizationSupporting other languages or locales. (aka i18n)platform-windowsBuilding on or for Windows specifically

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions