Skip to content

Platform.localeName always returns 'en_US' #13363

@zzzev

Description

@zzzev

Steps to Reproduce

  1. Start an android emulator
  2. Change the locale (Settings > Languages & input > Languages, then either add a non-english one or sort a non-English one to the top of the list).
  3. Start a flutter app that includes the line print(Platform.localeName);, note that the output is always 'en_US'

Expected behavior

Platform.localeName should return the locale string that is associated with the language at the top of the list in the settings app.

A MaterialApp's localizationsDelegate does (eventually) load the correct locale, so it is available there, but there shouldn't be a discrepancy between the values (even at this later point, where the localizationsDelegate is passed the correct locale, Platform.localeName still returns 'en_US').

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions