XForms: labels and internationalization

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

XForms: labels and internationalization

Marcel Overdijk
Is there a way to use internatiolized xforms:labels based on the locale
in the browser?

_______________________________________________
mozilla-xml mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-xml
Reply | Threaded
Open this post in threaded view
|

Re: XForms: labels and internationalization

Aaron Reed
[hidden email] wrote:

> Is there a way to use internatiolized xforms:labels based on the locale
> in the browser?
>

I would suggest that the easiest way to do it would be from the server.
  So have the XForm pull its labels from an external instance and point
the @src attribute on the xf:instance to the server.  When the request
comes in to the server, parse the accept header to figure out the locale
of the browser, and send back the appropriate .xml file.  Otherwise
you'll have to embed in your instance data all of the possible
translations and switch to the appropriate language using form logic,
which is also possible.  But the first suggestion I gave is the one that
I think that most will use.

--Aaron
_______________________________________________
mozilla-xml mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-xml
Reply | Threaded
Open this post in threaded view
|

Re: XForms: labels and internationalization

beaufour@gmail.com
On 12/6/05, Aaron Reed <[hidden email]> wrote:
[hidden email] wrote:

> Is there a way to use internatiolized xforms:labels based on the locale
> in the browser?
>

I would suggest that the easiest way to do it would be from the server.


Or, kind of hacky, set an instance data node to the locale, which is submitted on load, to fetch the correct locale messages.

--
... Allan
Reply | Threaded
Open this post in threaded view
|

Re: XForms: labels and internationalization

Marcel Overdijk
In reply to this post by Aaron Reed

Aaron Reed wrote:

> [hidden email] wrote:
>
> > Is there a way to use internatiolized xforms:labels based on the locale
> > in the browser?
> >
>
> I would suggest that the easiest way to do it would be from the server.
>   So have the XForm pull its labels from an external instance and point
> the @src attribute on the xf:instance to the server.  When the request
> comes in to the server, parse the accept header to figure out the locale
> of the browser, and send back the appropriate .xml file.  Otherwise
> you'll have to embed in your instance data all of the possible
> translations and switch to the appropriate language using form logic,
> which is also possible.  But the first suggestion I gave is the one that
> I think that most will use.
>
> --Aaron

Thanks Aaron,

Is there any example/documentation available how to this (first
suggestion)?

Regards,
Marcel

_______________________________________________
mozilla-xml mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-xml