jachzen / cunning_document_scanner

MIT License
79 stars 83 forks source link

[iOS] How to localize? #10

Closed defuncart closed 1 year ago

defuncart commented 1 year ago

Hi 👋 , thanks for creating this package. For iOS, VNDocumentCameraViewController is used. I assume that Apple have automatically localized this controller? In the README it can be seen that although the device language is DE, EN is displayed in the controller. This I can also reproduce using example app, even adding flutter_localizations and hardcoding the locale does not change anything.

chrisDupuis commented 1 year ago

see flutter localized on ios https://docs.flutter.dev/development/accessibility-and-localization/internationalization

set in main localizationsDelegates: [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ], supportedLocales: [ Locale('fr', ''), // French, no country code ],

set Info.plist

CFBundleLocalizations
<array>
    <string>fr</string>
</array>
defuncart commented 1 year ago

Apologies, this seems to have been an error on my side, in a separate project, everything works as expected.