Hello,

I have a problem with loading message while using
XsltForms_globals.language != navigator (for example, "es").

When it is loading, internationalized message is loaded here:

        init : function() {
               
XsltForms_browser.setValue(document.getElementById("statusPanel"),
XsltForms_browser.i18n.get("status"));
                var b = XsltForms_browser.isXhtml ?
document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml";,
"body")[0] : document.getElementsByTagName("body")[0];

Inside "XsltForms_browser.i18n.get("status")"  we have:

                if (XsltForms_globals.language === "navigator" ||
XsltForms_globals.language !==
XsltForms_browser.selectSingleNodeText('language',
XsltForms_browser.config)) {
                        var lan = XsltForms_globals.language ===
"navigator" ? (navigator.language || navigator.userLanguage) :
XsltForms_browser.selectSingleNodeText('language',
XsltForms_browser.config);
                        lan = lan.replace("-", "_").toLowerCase();

If "XsltForms_globals.language" equals "navigator", everything is OK,
but when it is any other value, no language is retrieved  because
XsltForms_browser.config value is "dummy". Its content is loaded after,
in this line at the end of init method:

XsltForms_xmlevents.dispatchList(this.models, "xforms-model-construct");

Although it were loaded before, it would still fail because in
config.xsl it says language value must be "navigator" or "default".

I have done this change and it seems it is working:

                if (XsltForms_globals.language === "navigator" ||
XsltForms_globals.language !==
XsltForms_browser.selectSingleNodeText('language',
XsltForms_browser.config)) {
-                       var lan = XsltForms_globals.language ===
"navigator" ? (navigator.language || navigator.userLanguage) :
XsltForms_browser.selectSingleNodeText('language',
XsltForms_browser.config);
+                       var lan = XsltForms_globals.language ===
"navigator" ? (navigator.language || navigator.userLanguage) :
XsltForms_globals.language;

Best Regards,
Javier
















************************************************************************************************************************************************
*La información contenida en este mensaje de correo electrónico es confidencial 
y puede revestir el carácter de reservada.   *
*Está dirigida exclusivamente a la persona destinataria.                        
                                                                           *
*El acceso o cualquier uso por parte de cualquier otra persona de este mensaje 
no están autorizados y pueden ser ilegales.*
*Si no es Ud. la persona destinataria, le rogamos que proceda a borrarlo.       
                                                                   *
*The information in this e-mail is confidential and may be legally privileged.  
                                                                      *
*It is intended solely for the addressee.                                       
                                                                                
    *
*Access or any use by any other person to this Internet e-mail is not 
authorised and may be unlawful.                                 *
*If you are not the intended recipient, please delete this e-mail.              
                                                                           *
************************************************************************************************************************************************
 

<<attachment: jdiaz.vcf>>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to