Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9844

How to disable the translation of an HTML page part using internal CSS selectors

$
0
0

have a web page for which I want to enable automatic translation, excluding some parts. I would like to do this using the style selectors already present in the stylesheet within the HTML file.

I tried to add in under the selector of interest 'class = "notranslate"' and/or 'translate: no', but I did not have the desired results, as a result of searches carried out, these are only usable for inline CSS. The only solution is to use the <CODE> and <pre> tags, but they involve both opening and closing them </code> and </pre>. In my case, since the html page already exists, it would mean re-editing the whole document.Bad job !!

In real life:

<style type="text/css">     * {margin:0; padding:0; text-indent:0; }    h1 { color: black; font-family:"Times New Roman", serif; font-style: normal; font-weight: bold; text-decoration: none; font-size: 22pt; }    .p, p { color: black; font-family:"Times New Roman", serif; font-style: normal; font-weight: normal; text-decoration: none; font-size: 12pt; margin:0pt; }    .h4, h4 { color: black; font-family:"Times New Roman", serif; font-style: normal; font-weight: bold; text-decoration: none; font-size: 12pt; }    .s22 { color: black; font-family:"Times New Roman", serif; font-style: normal; font-weight: bold; text-decoration: underline; font-size: 12pt; } ...</style></head><body>    ...<pre><code><table style="border-collapse:collapse;margin-left:67.1pt" cellspacing="0"><tbody><tr style="height:38pt"><td style="width:104pt"><p class="s22" style="padding-left: 2pt;text-indent: 0pt;line-height: 12pt;text-align: left;">EEPROM_write:</p><p class="s21" style="padding-left: 174pt;text-indent: 0pt;line-height: 13pt;text-align: left;">sbic rjmp</p></td><td style="width:93pt"><p style="text-indent: 0pt;text-align: left;"><br></p><p class="s22" style="padding-left: 6pt;text-indent: 0pt;line-height: 13pt;text-align: left;">EECR,EEWE</p><p class="s22" style="padding-left: 6pt;text-indent: 0pt;line-height: 12pt;text-align: left;">EEPROM_write</p></td><td style="width:233pt"><p class="s22" style="padding-left: 12pt;text-indent: 0pt;line-height: 12pt;text-align: left;">; Etiquette d’attente</p><p class="s22" style="padding-left: 12pt;text-indent: 0pt;line-height: 13pt;text-align: left;">; Test si l’écriture est terminé</p><p class="s22" style="padding-left: 12pt;text-indent: 0pt;line-height: 12pt;text-align: left;">; Boucle si pas terminé</p></td></tr>    ...    ...</tbody></table></code></pre>......

in the example listing, if the part of text not to be translated and containing source code was the class called .s22 what should I do to not have it translated?thanks


Viewing all articles
Browse latest Browse all 9844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>