How to change the language of the Flutter Image Picker plugin?

Asked

Viewed 236 times

2

I would like to change the language of the text that is displayed in the library image_picker, i would like to leave this text translated into the user’s mobile language. If the image of how it is presented today when opening the camera: Tela atual ao abrir a câmera, apresenta dois botões onde apresentam respectivamente o palavra "Retake" e "Use Photo"

I would like to change the text "Retake" to "Take Again" if the device language is English.

The function for the camera opening is like this:

File file = await ImagePicker.pickImage(source: ImageSource.camera);

This problem only happens on iOS

  • It depends if lib supports it, but have you tried locating your app for ptbr? https://answall.com/questions/399390/flutter-alterar-internacionaliza%c3%a7%c3%a3o-de-nomes-de-datas/399415#399415

  • Already perform the configuration of localizationsDelegates and supportedLocales that my application supports, which in this case is English, Portuguese and Spanish, but would not even need to follow the language of the application, just using the language of the device would already be happy, because it would improve the user experience.

2 answers

3


The steps to resolve the following question is here: Spanish support for Retake and Use photo Buttons of Uiimagepickercontroller

Where the developer should add the languages supported by the app to the iOS project setup!

In my case the mistake was that I was putting only English as the language of the application. Tela de adição de localização de projetos iOS By adding more languages the camera aperture changed the language used in the words as shown in the following images, leaving them in the language of the device:

Alterado o idioma das palavras abaixo.

  • 1

    I tested this and it worked. Thank you very much!

0

The plugin does not have this functionality, you can suggest to developers here or you can clone the project and implement yourself by helping the community.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.