'AM/PM showing in different language in iOS

I have a time picker basically the user can select time with it. It's perfectly displaying in Android. But, am/pm is displaying in different language in iOS. Any idea why it is happening ?

Code

                               <TimePicker x:Name="time"
                                BackgroundColor="Transparent"
                                Format="hh:mm tt"
                                TextColor="{StaticResource TitleColor}"
                                Focused="time_Focused"
                                HorizontalOptions="CenterAndExpand"/>


time.Time = new TimeSpan(07, 30, 00);

View



Solution 1:[1]

I know in just regular c# I would do something like this: date1.ToString("hh:mm tt", CultureInfo.InvariantCulture) but I don't know how to add culture information in xaml code.

Solution 2:[2]

  1. You can check if the language supports English.

  2. You can use Custom Renderer to override it.

    This link introduces the method of rewriting. You can refer to the specific method inside.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jorne Schuurmans
Solution 2 Wen xu Li - MSFT