Python Forum

Full Version: Delimiters - How to skip some html tags from being translate
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?