What is the correct approach to using strong / em tags to localize strings?

I know that some languages โ€‹โ€‹emphasize words differently in English, for example. by changing the endings of words, rather than underlining words with an inflection of voice.

If you localize the site, can you trust that the <strong> and <em> tags (and their placement) will have the same meaning in other languages โ€‹โ€‹- do you keep this emphasis, contact your translator or leave them

I wonder how this translates (sorry for the pun) into the semantics of the Internet? - Strong and tag tags carry a semantic meaning that is used in SEO, on-screen readers, etc. So should they be left in place so that they donโ€™t get lost or fall in order to better match the target language?

+6
source share
4 answers

Markup is there to convey meaning to the whole, and as long as the meaning is conveyed, you have succeeded in your allowance. Thus, in a language where the emphasis is underlined in the text, the use of tags to indicate emphasis is redundant and optional.

Line level markup, much more important than block level markup, may need to be radically distinguished in different languages. In a good translation, the text should be marked from scratch in each language.

+3
source

For individual words, I left markup tags in the translation lines for the reasons stated in the comments above. If you select blocks of text, whole sentences, numbers, etc., I would put it in the template, if possible, since this is not exactly what you would have to confuse with the translation.

A good idea might be a flag in a template that you made using comments. You will also need some reliable process so that all translation files are changed if you decide to change the emphasis ever (which you will inevitably be). This is a pain, so I try to avoid adding emphasis to individual words, where possible :)

+1
source

Interest Ask! The only thing I can add is that strong and em tags are only useful for SEO if search engines associate these tags with the content of your site.

I would recommend using these tags only if there is a real reason (for emphasis, say), and not in order to hope to get SEO benefits from bold or italic keywords.

+1
source

For screen reading, it comes down to what language you speak. For example, JAWS can upload voice files . If it is not in the list, then they need to choose another language or find alternative ways. The main thing is that you set the lang attribute correctly.

0
source

Source: https://habr.com/ru/post/919316/


All Articles