alexsorokoletov / Xamarin.iOS.DatePickerDialog

Xamarin iOS C# port of https://github.com/squimer/DatePickerDialog-iOS-Swift
MIT License
24 stars 15 forks source link

Auto Localization #13

Closed dimonovdd closed 3 years ago

dimonovdd commented 3 years ago

Description of Change

This request adds automatic localization of Cancel and Done buttons.

API Changes

Added useLocalizedButtons parameter to the constructor

public DatePickerDialog(UIColor? textColor = null, UIColor? buttonColor = null, UIFont? font = null, NSLocale? locale = null,
            bool showCancelButton = true, bool useLocalizedButtons = false)
alexsorokoletov commented 3 years ago

@dimonovdd thanks for the PR! It's a great idea to use system done/cancel buttons for this.

Can you provide some visuals how it's going to look like with these changes?

dimonovdd commented 3 years ago

I can send a screenshot tomorrow

alexsorokoletov commented 3 years ago

@dimonovdd sure, whenever you have a chance!

alexsorokoletov commented 3 years ago

This looks good! Post some screenshots and we'll move forward!

dimonovdd commented 3 years ago

@alexsorokoletov

I would like to make a few more improvements. Should I create new PRs for this?

alexsorokoletov commented 3 years ago

@alexsorokoletov

I would like to make a few more improvements. Should I create new PRs for this?

If it's along the same lines as this PR - keep it updated and ping me when you're done. If it's something else (not related to this PR) - make a new one.

dimonovdd commented 3 years ago

I'll create new PRs when we're merge with this.

dimonovdd commented 3 years ago

I tried to do this without any differences from the original design. But the size of the buttons is used by the system and the "Done" button has a bold font.

Done (NO) Done (En) Dark Mode (En)
Done DoneEn DarkEn
DoneCancel (NO) DoneCancel (En) DoneCancel (Ru)
DoneCancel DoneCancelEn DoneCancelRu
alexsorokoletov commented 3 years ago

It looks great!

alexsorokoletov commented 3 years ago

published in the Nuget as 1.0.5.