Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change months language #822

Open
Costoleta opened this issue Dec 4, 2018 · 0 comments
Open

Change months language #822

Costoleta opened this issue Dec 4, 2018 · 0 comments

Comments

@Costoleta
Copy link

Costoleta commented Dec 4, 2018

Hi guys,

I'm using the pikaday in an app that can be in English or Arabic, is the user who choose it and it can be changed anytime.
I would like to know how can I swipe from one language to another when the user change a language?
It is possible to have something like this?
selectedLanguage = function (IsRTL){
var months;
if(IsRTL){
months = {
previousMonth : 'Previous Month',
nextMonth : 'Next Month',
months :['يناير','فبراير','مارس','إبريل','مايو','يونيو','يوليو','أغسطس','سبتمبر','أكتوبر','نوفمبر','ديسمبر'],
weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
midnight : 'Midnight',
noon : 'Noon'
};
}
else {
months = {
previousMonth : 'Previous Month',
nextMonth : 'Next Month',
months : ['January','February','March','April','May','June','July','August','September','October','November','December'],
weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
midnight : 'Midnight',
noon : 'Noon'
};
}
return months;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant