Author Topic: Spanish Calendar in English site  (Read 75 times)

Jason Anderson

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Virtual United States Army Aviation
Spanish Calendar in English site
« on: October 12, 2017, 06:04:12 PM »
Not really a bug, but when you register for the VA, the calendar block for birthdate entry is in Spanish, with no way to change it to English.  Is there any plan to update this module?

drgullen

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Spanish Calendar in English site
« Reply #1 on: October 26, 2017, 05:04:43 AM »
Look in your VAM installation for folder \vam\js\ and in that folder for a file called vam.js and open that in an editor.  Find the phrase "datetimepicker" without the quotes and then just under that you will see language: 'es' which you can change to language: 'en' for English or to whatever language VAM supports.

Cheers,
Glen

Jason Anderson

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Virtual United States Army Aviation
Re: Spanish Calendar in English site
« Reply #2 on: October 29, 2017, 06:38:50 PM »
Thank you sir!!

VAM

  • Administrator
  • Hero Member
  • *****
  • Posts: 1217
    • View Profile
    • virtual Airlines Manager
Re: Spanish Calendar in English site
« Reply #3 on: October 29, 2017, 09:33:03 PM »
Look in your VAM installation for folder \vam\js\ and in that folder for a file called vam.js and open that in an editor.  Find the phrase "datetimepicker" without the quotes and then just under that you will see language: 'es' which you can change to language: 'en' for English or to whatever language VAM supports.

Cheers,
Glen

Thanks for help!! indeed I have to add this in the VAM documentation.
VAM Creator and programmer.

drgullen

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Spanish Calendar in English site
« Reply #4 on: October 29, 2017, 10:06:52 PM »
You're welcome!  :)

drgullen

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Spanish Calendar in English site
« Reply #5 on: November 13, 2017, 01:19:57 AM »
Just a follow-up on this, once I switched to English, I was getting errors when trying to select the date from the calendar because I think in English, it's mm/dd/yyyy whereas in Spanish, it's dd/mm/yyyy, so after picking my date from the calendar, it told me it was invalid.

To fix it, I switched the mm and dd around in this section of code in that same vam.js file:

            birthdate: {
                message: "Birthdate is required",
                validators: {
                    notEmpty: {
                        message: "Please provide a Birthdate"
                    },
                    date: {
                            format: 'MM/DD/YYYY',
                            message: 'The format is mm/dd/yyyy'
                    }
                }
            },


Also note that there is another section like this a few hundred lines down in the same file where the calendar is also default to Spanish, so you need to make the changes listed in this thread there as well to change it to English or another language.

Cheers,
Glen