Anyone can share them a workaround for this bug, I also need to implement the Localization for Datepicker, I implementing the Localization in this link https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?tabs=windows
Then Translate and Change the Culture using this
public void SetLocale(CultureInfo ci)
{
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;
Console.WriteLine("CurrentCulture set: " + ci.Name);
}
But the app still using the Device OS culture setting.
I also try Custom Renderer.
public class CustomDatePickerRenderer : DatePickerRenderer
{
public CustomDatePickerRenderer(Context context) :base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.DatePicker> e)
{
base.OnElementChanged(e);
Locale locale = new Locale("ARA");
Control.TextLocale = locale;
Resources.Configuration.SetLocale(locale);
Resources.Configuration.Locale = locale;
Resources.Configuration.SetLayoutDirection(locale);
}
}