Thread: [Xsltforms-support] Where to place <?xsltforms-options?>
Brought to you by:
alain-couthures
From: Philip F. <Phi...@ma...> - 2011-04-18 06:03:26
|
I have been trying to change the default language, used by XSLTForms Beta 3 in Firefox 3.6.10, to 'en' so that the date picker will display dd/mm/yyyy but I cannot get it to change using the xsltforms-options PI: <?xsltforms-options debug="no" lang="en"?> I have tried placing the PI before and after the xml-stylesheet PI and also inside the xhtml:head and xf:model elements but without any luck. Where should the PI go? Regards Philip Fennell Consultant MarkLogic Corporation One Kingdom Street Paddington Central London W2 6BD United Kingdom Mobile: +44 (0) 7824 830 866 Tel: +44 (0) 203 402 3619 email Phi...@ma...<mailto:Fir...@ma...> web www.marklogic.com<http://www.marklogic.com/> |
From: Alain C. <ala...@ag...> - 2011-04-18 11:22:29
|
Hi Philip, Usually the options PI can be written just after the stylesheet PI (if you want all your forms to have the same language, you should better consider copying the corresponding config_###.xsl file into config.xsl). By default, "navigator" value will allow the browser to ask for its default language config file. For English, there are two possibilities: "en" and "en_us". Can you have a look at the HTTP requests, with a browser debugger, to check the name of the config file it wants to obtain? Thanks! -Alain Le 18/04/2011 07:50, Philip Fennell a écrit : > I have been trying to change the default language, used by XSLTForms > Beta 3 in Firefox 3.6.10, to 'en' so that the date picker will > display dd/mm/yyyy but I cannot get it to change using the > xsltforms-options PI: > <?xsltforms-options debug="no" lang="en"?> > I have tried placing the PI before and after the xml-stylesheet PI and > also inside the xhtml:head and xf:model elements but without any luck. > Where should the PI go? > Regards > Philip Fennell > Consultant > MarkLogic Corporation > > One Kingdom Street > Paddington Central > London W2 6BD > United Kingdom > Mobile: +44 (0) 7824 830 866 > Tel: +44 (0) 203 402 3619 > > ema...@ma... > <mailto:Fir...@ma...> > webwww.marklogic.com <http://www.marklogic.com/> > |
From: Philip F. <Phi...@ma...> - 2011-04-18 13:28:54
|
Alain, > Can you have a look at the HTTP requests, with a browser debugger, to check the name of the config file it wants to obtain? Regardless of how I configure my PC (Windows 7) and re-launch Firefox, Firebug shows that XSLTForms is requesting: GET http://localhost:8031/resource/xsltforms/config_en_us.xsl If I change the preferred language in Firefox options to en or en-GB XSLTForms still request config_en_us.xsl. > Usually the options PI can be written just after the stylesheet PI (if you want all your forms to have the same language, you should better consider copying the corresponding config_###.xsl file into config.xsl). I think I might just do that for now. Many thanks. Philip Fennell Consultant MarkLogic Corporation One Kingdom Street Paddington Central London W2 6BD United Kingdom Mobile: +44 (0) 7824 830 866 Tel: +44 (0) 203 402 3619 email Phi...@ma...<mailto:Fir...@ma...> web www.marklogic.com<http://www.marklogic.com/> From: Alain Couthures [mailto:ala...@ag...] Sent: 18 April 2011 12:24 To: Philip Fennell Cc: xsl...@li... Subject: Re: [Xsltforms-support] Where to place <?xsltforms-options?> Hi Philip, Usually the options PI can be written just after the stylesheet PI (if you want all your forms to have the same language, you should better consider copying the corresponding config_###.xsl file into config.xsl). By default, "navigator" value will allow the browser to ask for its default language config file. For English, there are two possibilities: "en" and "en_us". Can you have a look at the HTTP requests, with a browser debugger, to check the name of the config file it wants to obtain? Thanks! -Alain Le 18/04/2011 07:50, Philip Fennell a écrit : I have been trying to change the default language, used by XSLTForms Beta 3 in Firefox 3.6.10, to 'en' so that the date picker will display dd/mm/yyyy but I cannot get it to change using the xsltforms-options PI: <?xsltforms-options debug="no" lang="en"?> I have tried placing the PI before and after the xml-stylesheet PI and also inside the xhtml:head and xf:model elements but without any luck. Where should the PI go? Regards Philip Fennell Consultant MarkLogic Corporation One Kingdom Street Paddington Central London W2 6BD United Kingdom Mobile: +44 (0) 7824 830 866 Tel: +44 (0) 203 402 3619 email Phi...@ma...<mailto:Fir...@ma...> web www.marklogic.com<http://www.marklogic.com/> |
From: Alain C. <ala...@ag...> - 2011-04-18 20:24:00
|
Philip, I almost forgot that there is no way in Javascript to read browser language preferences... Have a look at http://blog.dansingerman.com/post/909213798/detecting-a-browsers-language-in-javascript, for more explanations. The JSONP workaround which is proposed might be implemented in XSLTForms if necessary! Thanks! -Alain Le 18/04/2011 15:28, Philip Fennell a écrit : > > Alain, > > > Can you have a look at the HTTP requests, with a browser debugger, to > check the name of the config file it wants to obtain? > > Regardless of how I configure my PC (Windows 7) and re-launch Firefox, > Firebug shows that XSLTForms is requesting: > > GET http://localhost:8031/resource/xsltforms/config_en_us.xsl > > If I change the preferred language in Firefox options to en or en-GB > XSLTForms still request config_en_us.xsl. > > |