Delimiters - How to skip some html tags from being translate - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Delimiters - How to skip some html tags from being translate (/thread-33775.html) |
Delimiters - How to skip some html tags from being translate - Melcu54 - May-26-2021 hello. I made a Python script, that translate my html pages languages in other language. This is my english html page that I want to translate in Belarusian, check HERE You can save it for testing And this is my Python code. The entire code HERE: The code is ok, the translation is ok except one thing. Some tags are also been translated, this are the tags I don't want to be translated: Quote:delimitatori_text_interior_articol = [['<h1 class="den_articol" itemprop="name', '</h1>'], ['<p class="text_obisnuit', '</p>'], ['<span class="text', '</span>'], ['<p class="text_obisnuit2">', '</p>'], ['<em>', '<em>']] but the tag <p class="text_obisnuit2"> </p> is still translated in other languages. For example in Belarusian, it becomes <span клас = «Text_obisnuit2»> </span> Can anyone find a solution and edit my code? |