Skip to content

Default to English when the system local is not supported by the app #6

@EchoEllet

Description

@EchoEllet

This bug was caught by @CatHood0.

Currently, the app defaults to the first supported language if the system language is not supported by the app and the user preference in the app's settings is to match the system language. Refer to the Flutter docs of locale property for more details.

The first supported language can be any language from the AppLanguage.

Expected behavior

English is more widely known and used, so the user is very likely to be familiar with English rather than a random language in the AppLanguage enum.

Steps to reproduce

  1. Set your system language to a language that's not supported by the app (e.g., Spanish).
  2. Run the app, navigate to the "Settings", and ensure the "App Language" is set to "System".

Fix

We need to provide either localeListResolutionCallback or localeResolutionCallback in the MaterialApp specifically in the main.dart file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions