Sorry, we don't support your browser.  Install a modern browser

Hiding specific content in some languages#33

M

There the possibility to add custiom CSS in Weglot for hiding bloks or specific content in specific langauges. For Example: I dont wont to show a link in the menu of english version, but only in the Italian or French language, or I wont to publish an embed form only in the English version and not in the other one.
I discovered this command with the support of Weglot, but It thik:

  • You should create a dedicated help article to explain the procedure in the support section
  • You could create a better usable function to hide or not some content in spceific language without coding.
4 years ago
Changed the title from "Better control for hiding specific content in some languages in Squarespace" to "Hiding specific content in some languages"
4 years ago

Here is what I do atm.

/ hide and show element based on language /
html[lang=”fr”] .hidden-fr display: none;
}
html[lang=”en”] .hidden-en display: none;
}

3 years ago
?

thanks a lot for the idea 💡 I applied a little different and for multiple porpouses

html:lang(en) .hidden-en display: none;
}

html:lang(fr) .hidden-fr display: none;
}

Other uses:
Example I need all elements of a div on a line in english but on multiple lines on french because french use more space I write:

html:lang(en) .my-class display: flex;
}

.my-class justify-content: space-between;
align-self: center;
}

a year ago

Where do you apply this? In the element css?

a year ago