How to use localization on DatePicker?

Hi guys! I know I can set the header texts but I'd like to change the "Cancel" button text. Is there any way to do this?

9 Replies 1 reply marked as answer

SS Suganya Sethuraman Syncfusion Team December 28, 2020 08:12 AM UTC

Hi Márcio,

Greetings from Syncfusion.

We don't have direct support for changing the default text of the footer buttons (Cancel, Ok). But you can achieve this requirement by using custom view along with the localization support and created a simple sample for your reference.

Please download the sample from the below link.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PickerLocalization18360180201692545619

Please let us know if you have any concerns.

Regards,
Suganya Sethuraman.
 


Marked as answer

MD Márcio de Souza Júnior December 28, 2020 06:44 PM UTC

Hi Suganya, thanks for your help.

I ran your sample and it worked good, but I would like to use the Portuguese Brazilian language (pt-BR) and seems there is no suport for this, right?


SS Suganya Sethuraman Syncfusion Team December 29, 2020 11:27 AM UTC

Hi Márcio,

Thanks for the update.

We have analyzed your query. We have prepared the sample using Portuguese Brazilian language (pt-BR). Please have the sample for your reference.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PickerLocalization2015681151

UG Link: https://help.syncfusion.com/xamarin/picker/localization

Please let us know if you have any concerns.

Regards,
Suganya Sethuraman.
 



MD Márcio de Souza Júnior December 29, 2020 01:35 PM UTC

Hi Suganya, thanks again!

I need to call the SetLocale only to localize at application level, right? Or I need even if I want to use the default device settings?

Márcio




SS Suganya Sethuraman Syncfusion Team December 30, 2020 08:04 AM UTC

Hi Márcio,

Thanks for the update.

We need to call the SetLocale only to localize at application level for Ok and Cancel button text, we don’t change the default device settings.

Regards,
Suganya Sethuraman.
 



HS Harsh Shah January 18, 2021 07:03 AM UTC

Hi, refer to this may it helps you.  https://github.com/xamarin/Xamarin.Forms/issues/8141 


SS Suganya Sethuraman Syncfusion Team January 19, 2021 12:23 PM UTC

Hi Harsh,

Thanks for the suggestion but the provided GitHub link is not accessible.

Regards,
Suganya Sethuraman.
 



CA Carlos Alberto March 26, 2022 10:15 AM UTC

I tried to sample and Thread.CurrentThread.CurrentUICulture, but if the device has other language, the datepicker load the language of device and skip Thread.CurrentThread.CurrentUICulture


the link https://www.github.com/xamarin/Xamarin.Forms/issues/8141 is the same issue?



SS Suganya Sethuraman Syncfusion Team March 28, 2022 01:25 PM UTC

Hi Carlos,

We have analyzed the reported issue. The device culture is Arabic, and we used "pt-BR" at the application level. However, “pt-BR” culture is applied to the application. Since we are unable to reproduce the issue “if the device has other language, the datepicker load the language of device and skip Thread.CurrentThread.CurrentUICulture”, we would like you to check the issue with the attached sample and video. Please let us know if it is reproduced. Else, please revert to us by modifying the sample based on your application and provide the replication procedure or the sample. It will be helpful for us to provide a better solution at the earliest.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PickerLocalization1836018020995624667

Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Picker_Localization382112824

Regards,
Suganya Sethuraman.
 
 


Loader.
Up arrow icon