orazz / CalendarPopUp

CalendarPopUp - JTAppleCalendar library
MIT License
184 stars 34 forks source link

How to localize calendar language? #19

Open hemangshah opened 6 years ago

hemangshah commented 6 years ago

Hi @orazz , in our app requirements I want to display the calendar popup in Arabic language. However, I am setting locale in your source code it's not showing the Arabic version of calendar, can you please help? I have used JTAppleCalendar directly in my code and when I set local it just work for me. But in your code it's not working for me.

orazz commented 6 years ago

In extension.swift file set your lang. and in CalendarPopUp.swift setDate() function for example

    let monthName = GetHumanDate(month: month)
    let week = GetTurkmenWeek(weekDay: weekday)
AD-Paladins commented 6 years ago

i added a little class in my fork that has this feature. Best regards

AD-Paladins commented 6 years ago
   let monthName = GetHumanDate(month: month, language: .spanish) 
   let week = GetTurkmenWeek(weekDay: weekday, language: .english)