MelindaMellukas
Member-
Posts
16 -
Joined
-
Last visited
MelindaMellukas's Achievements
-
Begona reacted to a post in a topic: How to translate "Read more" in multilingual site
-
Kountry started following MelindaMellukas
-
How to translate "Read more" in multilingual site
MelindaMellukas replied to MelindaMellukas's topic in Customize with code
Can somebody help with this? -
How to translate "Read more" in multilingual site
MelindaMellukas replied to MelindaMellukas's topic in Customize with code
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>
-
How to translate "Read more" in multilingual site
MelindaMellukas replied to MelindaMellukas's topic in Customize with code
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? https://cinnamon-chameleon-6wa9.squarespace.com/en/blog
-
Can't translate header menu button
MelindaMellukas replied to MelindaMellukas's topic in Customize with code
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/ -
Can't translate header menu button
MelindaMellukas replied to MelindaMellukas's topic in Customize with code
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/ -
Can't translate header menu button
MelindaMellukas replied to MelindaMellukas's topic in Customize with code
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>
-
Redirect /home page link to blog directly.
MelindaMellukas replied to A1Protocol's topic in Pages & Content
https://cinnamon-chameleon-6wa9.squarespace.com/ -
Can't translate header menu button
MelindaMellukas replied to MelindaMellukas's topic in Customize with code
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?