function loadLanguage(langName, callback)
        {
            if (!yoxviewLanguages[langName])
            {
                yoxviewLanguages[langName] = {};
                var langUrl = yoxviewPath + "lang/" + langName + ".js";
                /*$.ajax({
                    url : langUrl,
                    async : false,
                    dataType : "json",
                    success: function(data){
                        yoxviewLanguages[langName] = data;
                        if (callback)
                            callback(data);
                    },
                    error: function(){
                        alert("Error loading language file " + langUrl); 
                    }
                });*/

                        data = {
                            "Direction" : "ltr",
                            "Close" : "Close",
                            "Help" : "Help",
                            "FirstImage" : "To the first image",
                            "LastImage" : "To the last image",
                            "StartStopSlideShow" : "Play/Pause slideshow",
                            "Pause" : "Pause",
                            "Play" : "Play",
                            "Prev" : "Prev",
                            "PinInfo" : "Pin info",
                            "UnpinInfo" : "Unpin info",
                            "Next" : "Next",
                            "PrevImage" : "Previous image",
                            "NextImage" : "Next image",
                            "Loading" : "Loading",
                            "CloseHelp" : "Close help",  
                            "HelpText" : "The gallery can be navigated using the keyboard:<br/><br/>LEFT/RIGHT ARROWS: Prev/Next<br/>SPACEBAR: Next<br/>ENTER: Start/Stop slideshow<br/>ESCAPE: Close gallery<br/>HOME/END: First/Last image<br/>H - This help panel",
                            "Slideshow" : "Play",
                            "OriginalContext": "View in original context"
                        };
                         yoxviewLanguages[langName] = data;
                                if (callback)
                                    callback(data);



            }
            else if (callback)
                callback(yoxviewLanguages[langName]);
        }
// Load the language file if not already loaded:
Load the language file if not already loaded.
Load the language file if not already loaded .
function loadLanguage(langName, callback)
        {
            if (!yoxviewLanguages[langName])
            {
                yoxviewLanguages[langName] = {};
                var langUrl = yoxviewPath + "lang/" + langName + ".js";
                        data = {
                            "Direction" : "ltr",
                            "Close" : "Close",
                            "Help" : "Help",
                            "FirstImage" : "To the first image",
                            "LastImage" : "To the last image",
                            "StartStopSlideShow" : "Play/Pause slideshow",
                            "Pause" : "Pause",
                            "Play" : "Play",
                            "Prev" : "Prev",
                            "PinInfo" : "Pin info",
                            "UnpinInfo" : "Unpin info",
                            "Next" : "Next",
                            "PrevImage" : "Previous image",
                            "NextImage" : "Next image",
                            "Loading" : "Loading",
                            "CloseHelp" : "Close help",  
                            "HelpText" : "The gallery can be navigated using the keyboard:<br/><br/>LEFT/RIGHT ARROWS: Prev/Next<br/>SPACEBAR: Next<br/>ENTER: Start/Stop slideshow<br/>ESCAPE: Close gallery<br/>HOME/END: First/Last image<br/>H - This help panel",
                            "Slideshow" : "Play",
                            "OriginalContext": "View in original context"
                        };
                         yoxviewLanguages[langName] = data;
                                if (callback)
                                    callback(data);
            }
            else if (callback)
                callback(yoxviewLanguages[langName]);
        }
function loadLanguage ( langName , callback ) { if ( ! yoxviewLanguages [ langName ] ) { yoxviewLanguages [ langName ] = { } ; var langUrl = yoxviewPath + "lang/" + langName + ".js" ; data = { "Direction" : "ltr" , "Close" : "Close" , "Help" : "Help" , "FirstImage" : "To the first image" , "LastImage" : "To the last image" , "StartStopSlideShow" : "Play/Pause slideshow" , "Pause" : "Pause" , "Play" : "Play" , "Prev" : "Prev" , "PinInfo" : "Pin info" , "UnpinInfo" : "Unpin info" , "Next" : "Next" , "PrevImage" : "Previous image" , "NextImage" : "Next image" , "Loading" : "Loading" , "CloseHelp" : "Close help" , "HelpText" : "The gallery can be navigated using the keyboard:<br/><br/>LEFT/RIGHT ARROWS: Prev/Next<br/>SPACEBAR: Next<br/>ENTER: Start/Stop slideshow<br/>ESCAPE: Close gallery<br/>HOME/END: First/Last image<br/>H - This help panel" , "Slideshow" : "Play" , "OriginalContext" : "View in original context" } ; yoxviewLanguages [ langName ] = data ; if ( callback ) callback ( data ) ; } else if ( callback ) callback ( yoxviewLanguages [ langName ] ) ; }
Load the language file if not already loaded:
Load the language file if not already loaded :
/*$.ajax({
                    url : langUrl,
                    async : false,
                    dataType : "json",
                    success: function(data){
                        yoxviewLanguages[langName] = data;
                        if (callback)
                            callback(data);
                    },
                    error: function(){
                        alert("Error loading language file " + langUrl); 
                    }
                });*/