New language for datepicker.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

New language for datepicker.

Chriss
Hello,

According to the documentation: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-controls/input-control#TOC-Date-picker-internationalization, three languages for datepicker are supported.
I want to add new language - please give me a hint, which file do I have to edit.

Thanks in advance,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: New language for datepicker.

Alessandro  Vernet
Administrator
Hi Chris,

That is done in:

https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/ops/javascript/orbeon/xforms/control/CalendarResources.js

And the doc is inaccurate; as you can see in the source, more languages are supported. I updated the doc, and linked to this page, which lists the supported languages:

https://github.com/orbeon/orbeon-forms/wiki/Form-Runner-~-Supported-Languages

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: New language for datepicker.

Aaron Spike
Is https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/xbl/orbeon/date/date.js#L91 generated from CalendarResources.js then?


On Monday, October 20, 2014 1:24:05 PM UTC-5, Alessandro Vernet wrote:
Hi Chris,

That is done in:

<a href="https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/ops/javascript/orbeon/xforms/control/CalendarResources.js" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fblob%2Fmaster%2Fsrc%2Fresources-packaged%2Fops%2Fjavascript%2Forbeon%2Fxforms%2Fcontrol%2FCalendarResources.js\46sa\75D\46sntz\0751\46usg\75AFQjCNERBmDXYS7LSQFrV7uSARw-9zFv7A';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fblob%2Fmaster%2Fsrc%2Fresources-packaged%2Fops%2Fjavascript%2Forbeon%2Fxforms%2Fcontrol%2FCalendarResources.js\46sa\75D\46sntz\0751\46usg\75AFQjCNERBmDXYS7LSQFrV7uSARw-9zFv7A';return true;">https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/ops/javascript/orbeon/xforms/control/CalendarResources.js

And the doc is inaccurate; as you can see in the source, more languages are
supported. I updated the doc, and linked to this page, which lists the
supported languages:

<a href="https://github.com/orbeon/orbeon-forms/wiki/Form-Runner-~-Supported-Languages" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fwiki%2FForm-Runner-~-Supported-Languages\46sa\75D\46sntz\0751\46usg\75AFQjCNEI1dWdNnLoYsTC1Xtp1okO7A30Tw';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fwiki%2FForm-Runner-~-Supported-Languages\46sa\75D\46sntz\0751\46usg\75AFQjCNEI1dWdNnLoYsTC1Xtp1okO7A30Tw';return true;">https://github.com/orbeon/orbeon-forms/wiki/Form-Runner-~-Supported-Languages

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: <a href="http://discuss.orbeon.com/New-language-for-datepicker-tp4659137p4659150.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FNew-language-for-datepicker-tp4659137p4659150.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFkmo3Y2z305g0zGy0X7UKmiRITbw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FNew-language-for-datepicker-tp4659137p4659150.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFkmo3Y2z305g0zGy0X7UKmiRITbw';return true;">http://discuss.orbeon.com/New-language-for-datepicker-tp4659137p4659150.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: New language for datepicker.

Chriss
Thanks for the info.

My problem was that I had separated deployment and I had to add attribute lang=".." at the html element to enable datepicker language.
Reply | Threaded
Open this post in threaded view
|

Re: New language for datepicker.

Alessandro  Vernet
Administrator
Hi Chris,

Great, indeed, if not using Form Runner, adding lang="…" is your responsibility. I'm glad you found the solution.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: New language for datepicker.

Alessandro  Vernet
Administrator
In reply to this post by Aaron Spike
Hi Aaron,

The date.js is used by the date XBL component, which is deprecated since Orbeon Forms 4.5.

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components#TOC-Date

That component, indeed supports less languages, but unless one has an old project where they used that component manually, you shouldn't be using it. Instead, an xf:input bound to a node of type date, which is produced by Form Builder, supports many more languages (per CalendarResources.js).

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet