Hi,
We did understand your request, and of course as soon as the front-end language changes to a new one, the datepicker will apply the proper translations for that language. This is how a multi-language website is supposed to react.
The datepicker calendars used by Vik Booking share the same translations of any other page or widget of our plugin, and so if you have a valid PO/MO language file for the currently active language, all language strings will be translated automatically, as they will be read from the apposite PO/MO file of your language.
The datepicker calendars make no difference from the other sections/pages/widgets of our plugin.
What we suggest is to prepare some translations in at least one language, either by uploading on your site an existing PO/MO translation file contributed by our clients (can be downloaded from our website) or by using a third party plugin to manage GetText language translations. Then you should use your preferred plugin to set up a language switcher and allow activating a different language. WordPress will do everything by itself, by loading the appropriate PO/MO language file for the currently active language.
All you need to do is to have our plugin’s definitions translated into Spanish and Portuguese, then it’s up to your multi-language plugin to let the users switch the active language. Translations will then be made automatically, as they will be read for your current language.
Regarding your last message:
The jQuery UI Calendar has support for this, but the input id is assigned randomly.
Do not rely on CSS selectors by ID for the datepicker calendars, as those IDs are voluntarily generated as random values. This is because the “id” attribute in HTML must be unique, and if you were to publish multiple instances of the same “Search Form” widget on the same page, you would no longer have unique IDs if we didn’t use this technique.
If you need a CSS selector to identify the datepicker elements, you should rather rely on their “name” attribute, like ‘input[name=”checkindate”]’.
We hope this helps!
The VikWP Team