• I am using the Weglot plugin to translate our site. Weglot allows you to exclude areas that you don’t want translated, to save from your monthly quota of words.

    Weglot says:

    Excluded Blocks
    By default, everything is translated on a page but you can exclude a section of a page by entering the CSS selector or HTML block you want to exclude.

    We have successfully blocked everything containing the product name/product title EXCEPT one thing. There is a script running that contains the product name/product title and Weglot is translating the data in the script, even though it is not displayed. I have been working with Weglot support for about a week trying to figure out how to exclude it, but nothing has worked. ??

    Based on what Weglot said about, about excluding page sections, can you figure out a way to make the script able to be excluded? What is that script for and, if it isn’t important, is there a way to remove it or the product name/product title that it is pulling?

    Here is the script from the page. The translated words are: “Diamentowy wisiorek” (originally “Diamond Pendant“)

    <script type="application/ld+json">{"@context":"https:\/\/schema.org\/","@graph":[{"@context":"https:\/\/schema.org\/","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"name":"Strona g\u0142\u00f3wna","@id":"https:\/\/store.dolina.org"}},{"@type":"ListItem","position":2,"item":{"name":"Christmas Ornaments (Bombki Choinkowe)","@id":"https:\/\/store.dolina.org\/product-category\/christmas-ornaments-bombki-choinkowe\/"}},{"@type":"ListItem","position":3,"item":{"name":"Diamentowy wisiorek","@id":"https:\/\/store.dolina.org\/product\/diamond-pendant\/"}}]},{"@context":"https:\/\/schema.org\/","@type":"Product","@id":"https:\/\/store.dolina.org\/product\/diamond-pendant\/#product","name":"Diamentowy wisiorek","url":"https:\/\/store.dolina.org\/product\/diamond-pendant\/","description":"Kr\u00f3tki opis","image":"https:\/\/store.dolina.org\/wp-content\/uploads\/2016\/02\/jewelry.jpg","sku":213,"offers":[{"@type":"Offer","price":"250.00","priceValidUntil":"2021-12-31","priceSpecification":{"price":"250.00","priceCurrency":"USD","valueAddedTaxIncluded":"false"},"priceCurrency":"USD","availability":"http:\/\/schema.org\/InStock","url":"https:\/\/store.dolina.org\/product\/diamond-pendant\/","seller":{"@type":"Organization","name":"Sklep wysy\u0142kowy Zespo\u0142u Pie\u015bni i Ta\u0144ca Dolina","url":"https:\/\/store.dolina.org"}}],"aggregateRating":{"@type":"AggregateRating","ratingValue":"4.00","reviewCount":1},"review":[{"@type":"Review","reviewRating":{"@type":"Rating","bestRating":"5","ratingValue":"4","worstRating":"1"},"author":{"@type":"Person","name":"storesklep"},"reviewBody":"This is a test","datePublished":"2020-08-03T14:50:53-06:00"}]}]}</script>

    I even tried adding <div> around where I thought the scripts were being pulled in footer.php.

       </div> <!-- Page end -->
       <div id="No-Translate-Scripts">
       <?php wp_footer(); ?>
    	</div> 
    </body>
    </html>

    So far, I have only noticed it on the product page.

    Any thoughts or suggestions?

    • This topic was modified 4 years, 7 months ago by rigwald.
    • This topic was modified 4 years, 7 months ago by rigwald.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @rigwald,

    The script from the page is added via the SEO plugin, so can you please consult with the respective plugin developer instead? They might be able to assist you properly on it than we could.

    Thanks,
    Ankit

    Thread Starter rigwald

    (@rigwald)

    @tgboy

    Hi Ankit,

    Thank you for the information. Is thee a way to tell which plugin is controlling that code, because I don’t have a specific SEO plugin installed.

    Hi @rigwald,

    Can you please try deactivating the used plugin one by one, and check to identify the source of your troubles? And, it doesn’t come from the theme so we might not assist you properly regarding it.

    Thanks and Regards,
    Ankit

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Script Issue When Translating Using Weglot’ is closed to new replies.