DragonCat - Kiara
DragonCat - Kiara

Reputation: 11

Flutter App Localization enable Language switching for Android

It works on ios. So in ios you can change an apps language if it supports multiple ones. In android i believe you can do this too (google says so). I have setup my project with flutters l10n localization. Depending on the system language the app is either in german or english. this works. however on my iphone simulator i can switch the preferred app language in the settings after adding the second language in my project. On my android emulator i cannot do this. For other pre-installed apps there is an language option tho. (I followed this: https://docs.flutter.dev/ui/accessibility-and-internationalization/internationalization)

I already tried adding a second language by adding some xml files in my android build folder, didnt work either.

l10n.yml

arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart

pubspec.yml

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  intl: any

Target android version: 33 (Simulator version: 34) Flutter version: 3.16.7

This is the exact setting im searching for (first settings options for calendar app on android simulator, second beeing my flutter apps settings on an iphone)

android settings

ios settings

Upvotes: 0

Views: 39

Answers (0)

Related Questions