Translating webpage button
up vote
0
down vote
favorite
$('.button1').click(function(){
var lang = $('html').attr('lang');
if(lang == 'en') $('html').attr('lang','es')
// if(lang == 'es') $('html').attr('lang','en');
});
$('.button2').click(function(){
var lang = $('html').attr('lang');
// if(lang == 'en') $('html').attr('lang','es')
if(lang == 'es') $('html').attr('lang','en');
});
This is my code to translate web page, but the problem is that i need to clik button on every page to translate it. How is possible if i click once at first page to translate all pages?
web translate
add a comment |
up vote
0
down vote
favorite
$('.button1').click(function(){
var lang = $('html').attr('lang');
if(lang == 'en') $('html').attr('lang','es')
// if(lang == 'es') $('html').attr('lang','en');
});
$('.button2').click(function(){
var lang = $('html').attr('lang');
// if(lang == 'en') $('html').attr('lang','es')
if(lang == 'es') $('html').attr('lang','en');
});
This is my code to translate web page, but the problem is that i need to clik button on every page to translate it. How is possible if i click once at first page to translate all pages?
web translate
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
$('.button1').click(function(){
var lang = $('html').attr('lang');
if(lang == 'en') $('html').attr('lang','es')
// if(lang == 'es') $('html').attr('lang','en');
});
$('.button2').click(function(){
var lang = $('html').attr('lang');
// if(lang == 'en') $('html').attr('lang','es')
if(lang == 'es') $('html').attr('lang','en');
});
This is my code to translate web page, but the problem is that i need to clik button on every page to translate it. How is possible if i click once at first page to translate all pages?
web translate
$('.button1').click(function(){
var lang = $('html').attr('lang');
if(lang == 'en') $('html').attr('lang','es')
// if(lang == 'es') $('html').attr('lang','en');
});
$('.button2').click(function(){
var lang = $('html').attr('lang');
// if(lang == 'en') $('html').attr('lang','es')
if(lang == 'es') $('html').attr('lang','en');
});
This is my code to translate web page, but the problem is that i need to clik button on every page to translate it. How is possible if i click once at first page to translate all pages?
web translate
web translate
edited yesterday
asked 2 days ago
Sanja Vesic
13
13
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53343544%2ftranslating-webpage-button%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown