This code is correct:six gyn wrote:Some time ago mention was made of how to apply coding to enable language switches in Highslide
if (lang == 'cz') {
hs.lang = {
loadingText : 'Načítá se...',
[...]
};
} else {
hs.lang = {
loadingText : 'Loading',
[...]
};
}
I have tried several times to apply this if else conditional statement.
The top end of highslide.js is
var hs = {
// Language strings
lang : {
cssDirection: 'ltr',
loadingText : 'Loading...',
loadingTitle : 'Click to cancel',
focusTitle : 'Click to bring to front',
(missing code)
fullExpandText : '1:1',
number: 'Image %1 of %2',
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
},
My knowledge of javascript is not good enough to apply this.
I note the section of code in the suggestion end with ;
whereas in the actual file it is ,
Additionally the top end of the section is
var hs = {
// Language strings
lang : {
which differs to the code needed in the if else statement.
Would anyone help me in my ignorance.
I would love to be able to switch languages -
By the way I use Joomla and Joomfish
If it doesn't work for you, please post the link to a live web page and we'll help you debug it.if (lang == 'cz') {
hs.lang = {
loadingText : 'Načítá se...',
[...]
};
} else {
hs.lang = {
loadingText : 'Loading',
[...]
};
}
Another options, since you are using this in a Joomla environment, is to do the language selection on the server side using PHP and predefined JoomFish language strings.