Skip to content

The Locale set in the MaterialApp is not the one defined on the IOS Simulator #17933

@AlexandreRoba

Description

@AlexandreRoba

Steps to Reproduce

I simply copy pasted the code from the following example in a blank app.
https://github.com/flutter/website/tree/master/_includes/code/internationalization/minimal

It should display a Hello World message in the Local of the IOS phone.

I changed the language to spanish and i still get the message in English.

I have added the fr local and changed to FR samething.

I tried to to get the local using:

Locale myLocale = Localizations.localeOf(context);

I'm always getting en.

Logs

log.log

Analyzing sweetnest_app...

   info • Unused import: 'package:redux/redux.dart' • lib/main.dart:6:8
   info • Unused import: 'package:flutter_redux/flutter_redux.dart' • lib/main.dart:7:8
   info • Don't import implementation files from another package • lib/main.dart:9:8
   info • Unused import: 'package:sweetnest/src/app_state.dart' • lib/main.dart:9:8
   info • Don't import implementation files from another package • lib/main.dart:10:8
   info • Unused import: 'package:sweetnest/src/reducers.dart' • lib/main.dart:10:8
   info • Unused import: 'package:sweetnest_app/sweetnest_colors.dart' • lib/main.dart:11:8
   info • Unused import: 'package:sweetnest_app/sweetnest_localization.dart' • lib/main.dart:12:8

8 issues found. (ran in 1.6s)
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.4.4, on Mac OS X 10.13.4 17E202, locale en-BE)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3.1)
[✓] Android Studio (version 3.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.1.4)
[✓] VS Code (version 1.23.1)
[✓] Connected devices (1 available)

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: internationalizationSupporting other languages or locales. (aka i18n)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions