MelindaMellukas
-
Posts
16 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by MelindaMellukas
-
-
Can somebody help with this?
-
This didnt change it either.
-
-
Site URL: https://cinnamon-chameleon-6wa9.squarespace.com/
Hi, I managed to change in estonian version nicely but english version it changes all the time to "Kontakt" to "Contact" visbily:
https://cinnamon-chameleon-6wa9.squarespace.com/en/home
Code I used:
/* ADD EXCLUSION NAV ITEMS */
$('.exclude-me,.exclude-me a').addClass('exclude');
$('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');
});
$(document).ready(function(){
$("body.body-en a.btn").html(function() {
return $(this).html().replace("Kontakt", "Contact");
});
$("body.body-en a.btn").attr('href','/en/contact');
});
</script> -
Hi, unfortunately it didnt work 😞
-
Site URL: https://cinnamon-chameleon-6wa9.squarespace.com/
Hi,
I used on footer this code and it worked well in the estonian version https://cinnamon-chameleon-6wa9.squarespace.com/et/blogi:
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('.blog-more-link:contains("Read More")').text('Loe rohkem');
</script>
<style>However, how do I keep Read more in the English version?
-
I couldnt get it working like this or im missing smth from the code. Problem is its changing visbily Kontakt to Contact in sthe english menu if you navigate between menu items. https://cinnamon-chameleon-6wa9.squarespace.com/
-
2 hours ago, tuanphan said:
Try adding this to Design > Custom CSS
/* Nav links flash */ .header-nav-list { visibility: hidden; } .header-nav-list .multilanguage { visibility: visible; }
I couldnt get it working like this or im missing smth from the code. Problem is its changing visbily Kontakt to Contact in sthe english menu if you navigate between menu items. https://cinnamon-chameleon-6wa9.squarespace.com/
-
Hi, Thank you! I got it working but when you click on english version menu, its a bit flashy, going quickly from Kontakt to Contact: https://cinnamon-chameleon-6wa9.squarespace.com
My code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(function() {
/* SETUP MULTI-LANGUAGE */
var defaultLanguage = 'et';
var lang = location.pathname.split("/")[1];
var defaultClass = 'lang-'+defaultLanguage+'';
var itemParent = "nav [class*='collection'],nav [class*='folder'],nav [class*='index'],nav [class*='group']";
if (lang == "et" || lang.length > 2 ){
var lang = defaultLanguage;
}/* ADD LANGUAGE CLASSES */
$('a[href="/"]').addClass('lang-'+defaultLanguage+'').parents(itemParent).addClass('lang-'+defaultLanguage+'');
$('nav a:link:not([href^="http://"]):not([href^="https://"])').each(function () {
var langType = $(this).attr('href').split("/")[1];
var multiLanguageClass = 'multilanguage lang-' + langType + '';
if (undefined !== langType && langType.length <= 2)
$(this).addClass(multiLanguageClass).parents(itemParent).addClass(multiLanguageClass);
});
$('nav button').each(function () {
var langTypeFolder = $(this).attr('data-controller-folder-toggle').split("/")[0];
var multiLanguageClass = 'multilanguage lang-' + langTypeFolder + '';
if (undefined !== langTypeFolder && langTypeFolder.length <= 2)
$(this).addClass(multiLanguageClass);
});
/* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */
if (lang == "en") {
$('a[href="/"]').attr("href", "/en/home");
$('body').addClass("body-en");
}
if (lang == "et") {
$('a[href="/"]').attr("href", "/et/home");
$('body').addClass("body-et");
}
/* ADD EXCLUSION NAV ITEMS */
$('.exclude-me,.exclude-me a').addClass('exclude');
$('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');
});
$(document).ready(function(){
$("body.body-en a.btn").html(function() {
return $(this).html().replace("Kontakt", "Contact");
});
$("body.body-en a.btn").attr('href','/en/contact');
});
</script> -
I put this code to footer. It prevents going back to cover page BUT when clicking home button it doesnt stay at the language, it goes back to the default langeage.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(function() {
/* SETUP MULTI-LANGUAGE */
var defaultLanguage = 'et';
var lang = location.pathname.split("/")[1];
var defaultClass = 'lang-'+defaultLanguage+'';
var itemParent = "nav [class*='collection'],nav [class*='folder'],nav [class*='index'],nav [class*='group']";
if (lang == "en" || lang.length > 2 ){
var lang = defaultLanguage;
}/* ADD LANGUAGE CLASSES */
$('a[href="/"]').addClass('lang-'+defaultLanguage+'').parents(itemParent).addClass('lang-'+defaultLanguage+'');
$('nav a:link:not([href^="http://"]):not([href^="https://"])').each(function () {
var langType = $(this).attr('href').split("/")[1];
var multiLanguageClass = 'multilanguage lang-' + langType + '';
if (undefined !== langType && langType.length <= 2)
$(this).addClass(multiLanguageClass).parents(itemParent).addClass(multiLanguageClass);
});
$('nav button').each(function () {
var langTypeFolder = $(this).attr('data-controller-folder-toggle').split("/")[0];
var multiLanguageClass = 'multilanguage lang-' + langTypeFolder + '';
if (undefined !== langTypeFolder && langTypeFolder.length <= 2)
$(this).addClass(multiLanguageClass);
});/* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */
if (lang == "et") {
$('a[href="/"]').attr("href", "/et/home");
}
if (lang == "en") {
$('a[href="/"]').attr("href", "/en/home");
}
/* ADD EXCLUSION NAV ITEMS */
$('.exclude-me,.exclude-me a').addClass('exclude');
$('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');
});
</script> -
4 hours ago, tuanphan said:
Each template needs a different code. Can you share site url?
-
8 hours ago, tuanphan said:
You mean Kontakt button?
Yes, I changed it to Kontakt right now. English could be then Contact and Estonian (EE) Kontakt.
-
Hi, My URL is : https://cinnamon-chameleon-6wa9.squarespace.com/ I managed to direct home title ( or logo) to a content pages and not to a cover page when you click the logo.
But I struggle to redirect English (EN) to home-title to en/home, it goes back to home EE which is an estonian version and the deafult langauge.
PS. I havent added translation, just the footer is translated.
-
Hi, what code did you eventually use to disbale logo link?
-
Site URL: https://cinnamon-chameleon-6wa9.squarespace.com/
Hi, I can't find the right code for the header menu button, I want to translate the call-to-action button. I want it in English to be "Let's talk" and in Estonian version "Küsi pakkumine".
How to translate CTA button in a way it doesnt jump when navigate between menu items
in Customize with code
Posted
If you go different menu items, it switches quickly from Kontakt to Contact: https://cinnamon-chameleon-6wa9.squarespace.com/en/home
Thus, it needs some other code combination.