multi_select_flutter icon indicating copy to clipboard operation
multi_select_flutter copied to clipboard

How to translate this widget ?

Open applicationsweb opened this issue 4 years ago • 4 comments

Hello, how to translate this widget ? For exemple words : "CANCEL", "None Selected"

applicationsweb avatar Sep 21 '21 12:09 applicationsweb

cancelText: Text("None Selected"),

OlivierRidgebase avatar Sep 21 '21 13:09 OlivierRidgebase

Hi @applicationsweb

It looks like you can change the text of the buttons, I am using .tr() from easy_localization to run my translations depending on os language.

But you can just change the text manually if you don't need it to change.

MultiSelectDialogField(
        buttonText: const Text(
          'Select',
          style: TextStyle(
            color: Colors.white,
          ),
        ).tr(),
        cancelText: const Text('ביטול'),  // Changing cancel text  
        confirmText: const Text('Confirm/OK text here'),
        ....

But I am not sure about the Select at the top of the popup, @OlivierRidgebase do you know how to change its text?

image

guyluz11 avatar Jul 25 '22 23:07 guyluz11

Hi @applicationsweb

It looks like you can change the text of the buttons, I am using .tr() from easy_localization to run my translations depending on os language.

But you can just change the text manually if you don't need it to change.

MultiSelectDialogField(
        buttonText: const Text(
          'Select',
          style: TextStyle(
            color: Colors.white,
          ),
        ).tr(),
        cancelText: const Text('ביטול'),  // Changing cancel text  
        confirmText: const Text('Confirm/OK text here'),
        ....

But I am not sure about the Select at the top of the popup, @OlivierRidgebase do you know how to change its text?

image

Hi @guyluz11 , I don't know if it's what you are looking for, It's a long time that I configured the widget, but there is a title option

OlivierRidgebase avatar Jul 26 '22 12:07 OlivierRidgebase

Thanks @OlivierRidgebase That is precisely what I have searched for.

guyluz11 avatar Jul 26 '22 13:07 guyluz11