Skip to content

How to change biometric authentication messages in another language? #42634

@jargalbat

Description

@jargalbat

How to change biometric authentication failed messages. I used flutter local_auth package.
I want to translate messages below to another language. I think these messages are coming from system and using system language. It must be in english even system language is in another language. In my case, title's text is in English, body's texts are in French. It must be in same language.

  • No match.
  • Keep your finger on the sensor a little longer.
  • Make sure your finger covers the entire sensor.

Click here to see image of biometric auth dialog.

final LocalAuthentication auth = LocalAuthentication();
bool authenticated = false;

try {
  authenticated = await auth.authenticateWithBiometrics(
    localizedReason: 'biometric auth for login',
    useErrorDialogs: false,
    stickyAuth: true,
    androidAuthStrings: AndroidAuthMessages(
      signInTitle: 'Fingerprint login',
      ...
    ),
    iOSAuthStrings: IOSAuthMessages(
      lockOut: 'test',
      ...
    ),
  );
} on PlatformException catch (e) {
  if (e.code == auth_error.notAvailable) {
    print(e);
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: internationalizationSupporting other languages or locales. (aka i18n)d: stackoverflowGood question for Stack Overflowp: local_authPlugin for local authentificationpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions