One way to do I18N is simply to use a server-side template processing
engine. You can use any that exist already: JSP, PHP, ASP, even SSI.
You can also use XSLT.
Another way, using XForms, is to use label/@ref and itemset, and
populate the data from an instance.
When the instance containing the labels is fetched, the server can read
the HTTP Accept-Lang header.
Or, a form other can set some server-side parameter which can then be
used later to determine the user's language choice.
In XForms 1.0 help and friends have a src attribute that lets you source
these offbox. In XForms 1.1 they got removed, not because they weren't
useful, but because it was felt that the host language should provide
them. That's fine if your host language is XHTML 2, but not if your
host language is XHTML 1. So, my hope is that Mozilla keeps them as
features of their integration with XHTML1 (which, after all, isn't
specified by anybody).
In the attached files I took the HTTP GET approach, but of course the
values come from files which never change.
You can of course host the files on your web server and use whatever
logic you want (session variables, cookes, HTTP Accept-Lang) to decide
exactly what bundle file to serve up.
And, you can write an XSLT transformation that takes the same bundles
files and applies them directly to the XForms page as is, except for the
itemsets, of course, unless you want to pull them inline as well. If
you decide to go this route please write back.
Leigh.
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms