Foros de discusión

Localize Allou UI DatePicker

Low Trux, modificado hace 9 años.

Localize Allou UI DatePicker

Junior Member Mensajes: 64 Fecha de incorporación: 6/11/14 Mensajes recientes
I have been trying to localize a couple of calendars based on Alloy UI datepicker with no success. Im trying to find a way to translate the datepicker modules to Catalan without having to change the whole portal language. Is there any way to localize just the DatePicker modules ?. BTW the [lang:"language"] property solution showed in the AUI website is not working for me, im using liferay 6.2. Hope you guys can help me. Many Thanks in advance.
thumbnail
Kyle Joseph Stiemann, modificado hace 9 años.

RE: Localize Allou UI DatePicker

Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
Both inside and outside the portal, you can localize AlloyUI and YUI components using YUI( { lang: 'ca-ES' } ). Note that AUI( { lang: 'ca-ES' } ) will not work in the portal since the AUI sandbox gets its locale from the portal, and does not allow you to modify it. Here's some example javascript that should do what you want:

YUI( { lang: 'ca-ES' } ).use('aui-datepicker', function(Y) {
new Y.DatePicker({
trigger: '#trigger',
popover: {
zIndex: 1
}
});
});

- Kyle
Low Trux, modificado hace 9 años.

RE: Localize Allou UI DatePicker

Junior Member Mensajes: 64 Fecha de incorporación: 6/11/14 Mensajes recientes
Thanks a lot Kyle, it worked ! just curious about the difference between :

<%@ taglib prefix="aui" uri="http://liferay.com/tld/aui" %> and
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>

It looks for me that they are just two different ways to reference the aui taglib but just want to be sure if i have to add both or just one (now i have both of them on my portlet jsp).
thumbnail
Kyle Joseph Stiemann, modificado hace 9 años.

RE: Localize Allou UI DatePicker

Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
I'm not really a JSP expert, but I believe that the order of attributes shouldn't matter. So both of those tags should be equivalent. But you can just try it, and your portlet will throw an error if there's something wrong.

- Kyle
mark grant, modificado hace 9 años.

RE: Localize Allou UI DatePicker

New Member Mensajes: 11 Fecha de incorporación: 10/01/15 Mensajes recientes
i think the first one is a link, the other one simply a reference
Low Trux, modificado hace 9 años.

RE: Localize Allou UI DatePicker

Junior Member Mensajes: 64 Fecha de incorporación: 6/11/14 Mensajes recientes
mark grant:
i think the first one is a link, the other one simply a reference


Thanks Mark, so i guess both would work and i only have to use one ? I guess to use the reference for a matter of better practice ?.