i17n date formating

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

i17n date formating

Damiano Albani-2
Hello,

I'd like to display an xs:date, contained in my instance, using a
certain locale -- French in my case.

So, inspired by the doc/example, I have something like :

<xforms:output ref="tfi:DébutValidité"
xxforms:format="format-date(xs:date(.), '[D] [Mn] [Y]', 'fr', (),
())"/>

which is strangely displayed as :

[Language: en]29 august 2005

for an xs:date = "2005-08-09", whereas it should be :

29 août 2005

Strange isn't it ? The XForms Controls example of my very recent build
also displays incorrectly:

Date (in French):      [Language: en]Thursday, le 20 July 2006


By the way, would it be possible to choose the locale according to the
browser preferences ? That's not something I *need* but that kind of
feature would be nice :)

Cheers,

--
Damiano ALBANI



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Erik Bruchez
Administrator
Damiano,

I assume you must be using a fairly old build: more recent builds
support a version of Saxon which is able to format with 'en', 'fr', and
'de' at least. Formatting in French works, we tried it :-)

Currently you can't automatically choose the locale based on the
browser, but you could write code that does that within xxforms:format,
assuming you have stored the currently language in an XForms instance.

By the way, it is usually a mistake to make a use language decision
based on browser / operating system / IP address: the user may be in an
internet cafe, be in Japan but speak English or Italian, etc.

It is much better to let the user choose his language. The latest DMV
Forms example (in CVS / nightly builds) BTW illustrates a very nice
instant language switching capability (English and French for now).

-Erik

Damiano Albani wrote:

> Hello,
>
> I'd like to display an xs:date, contained in my instance, using a
> certain locale -- French in my case.
>
> So, inspired by the doc/example, I have something like :
>
> <xforms:output ref="tfi:DébutValidité"
> xxforms:format="format-date(xs:date(.), '[D] [Mn] [Y]', 'fr', (),
> ())"/>
>
> which is strangely displayed as :
>
> [Language: en]29 august 2005
>
> for an xs:date = "2005-08-09", whereas it should be :
>
> 29 août 2005
>
> Strange isn't it ? The XForms Controls example of my very recent build
> also displays incorrectly:
>
> Date (in French):      [Language: en]Thursday, le 20 July 2006
>
>
> By the way, would it be possible to choose the locale according to the
> browser preferences ? That's not something I *need* but that kind of
> feature would be nice :)
>
> Cheers,
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Damiano Albani-2
On 7/20/06, Erik Bruchez <[hidden email]> wrote:
> Damiano,
>
> I assume you must be using a fairly old build: more recent builds
> support a version of Saxon which is able to format with 'en', 'fr', and
> 'de' at least. Formatting in French works, we tried it :-)

I've just downloaded the latest nightly build from the forge... and
the date localization issue is still there, including in the "XForms
Controls" example.

What have I /again/ done wrong ? :)

--
Damiano ALBANI



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Erik Bruchez
Administrator
Damiano Albani wrote:

> On 7/20/06, Erik Bruchez <[hidden email]> wrote:
>> Damiano,
>>
>> I assume you must be using a fairly old build: more recent builds
>> support a version of Saxon which is able to format with 'en', 'fr', and
>> 'de' at least. Formatting in French works, we tried it :-)
>
> I've just downloaded the latest nightly build from the forge... and
> the date localization issue is still there, including in the "XForms
> Controls" example.
>
> What have I /again/ done wrong ? :)
This time I am not sure! Have you tried simply running the XForms
Controls example in the downloaded WAR (without your own changes)? You
should see something like the attached screenshot, with an example of
date in French.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

dates.png (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Damiano Albani-2
On 7/24/06, Erik Bruchez <[hidden email]> wrote:
> This time I am not sure! Have you tried simply running the XForms
> Controls example in the downloaded WAR (without your own changes)? You
> should see something like the attached screenshot, with an example of
> date in French.

Again, I've downloaded OPS nightly build of today (24 July), put it in
"/webapps" as-is, but I don't get the same result as you in the
Controls example...

My software setup is :
 * Sun's Java 1.5 on Ubuntu 6.06 with en-US locale
 * Apache Tomcat 5.5.15
 * Firefox 1.5

I really don't understand ! :-)

--
Damiano ALBANI


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

ops.png (26K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Alessandro  Vernet
Administrator
On 7/24/06, Damiano Albani <[hidden email]> wrote:
> Again, I've downloaded OPS nightly build of today (24 July), put it in
> "/webapps" as-is, but I don't get the same result as you in the
> Controls example...

Damiano,

I can see the same thing. I created a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305815&group_id=168&atid=350207

Alex
--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Erik Bruchez
Administrator
Alessandro Vernet wrote:

> On 7/24/06, Damiano Albani <[hidden email]> wrote:
>> Again, I've downloaded OPS nightly build of today (24 July), put it in
>> "/webapps" as-is, but I don't get the same result as you in the
>> Controls example...
>
> Damiano,
>
> I can see the same thing. I created a bug to track this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305815&group_id=168&atid=350207 
This should now be fixed. The French Numberer class for Saxon was not
committed to CVS.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Damiano Albani-2
On 7/25/06, Erik Bruchez <[hidden email]> wrote:

> > I can see the same thing. I created a bug to track this:
> >
> > http://forge.objectweb.org/tracker/index.php?func=detail&aid=305815&group_id=168&atid=350207
>
> This should now be fixed. The French Numberer class for Saxon was not
> committed to CVS.

Now that we are in August (Août in French), there seems to be an
encoding issue as the "û" character is incorrectly 'rendered' and
appears as �� (U+FFFD) here in Firefox.

--
Damiano ALBANI


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Erik Bruchez
Administrator
Damiano,

This was fixed yesterday :-)

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305888&group_id=168&atid=350207

-Erik

Damiano Albani wrote:

> On 7/25/06, Erik Bruchez <[hidden email]> wrote:
>
>> > I can see the same thing. I created a bug to track this:
>> >
>> >
>> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305815&group_id=168&atid=350207 
>>
>>
>> This should now be fixed. The French Numberer class for Saxon was not
>> committed to CVS.
>
> Now that we are in August (Août in French), there seems to be an
> encoding issue as the "û" character is incorrectly 'rendered' and
> appears as �� (U+FFFD) here in Firefox.
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: i17n date formating

Damiano Albani-2
On 8/3/06, Erik Bruchez <[hidden email]> wrote:
> Damiano,
>
> This was fixed yesterday :-)

You work so fast ! :-)

--
Damiano ALBANI



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws