Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a correct approach to using strong/em tags when localising strings?

I know some languages emphasise words differently to English, e.g. via changing word endings rather than stressing words with inflection of the voice.

If you are localising a site, would you trust that <strong> and <em> tags (and their placement) will have the same meaning in other languages — would you maintain this emphasis, check with your translator or leave them out?

What I'm wondering is how this translates (excuse the pun) into the semantics of the web? — Strong and em tags carry semantic meaning that is used within SEO, screen-readers etc. So should they be left in place so this isn't lost, or dropped to better conform with the target language?

like image 407
anotherdave Avatar asked Jun 29 '12 11:06

anotherdave


3 Answers

Mark-up is there to convey meaning a whole, and so long as the meaning is conveyed, you have succeeded in your mark-up. So in a language where stress emphasis is conveyed in the text, using tags to signal the emphasis is redundant and optional.

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

like image 57
Alohci Avatar answered Nov 15 '22 07:11

Alohci


For individual words, I would leave the markup tags in the translation strings for the reasons outlined in comments above. If emphasising blocks of text, whole sentences, numerals, etc, I'd put it in the template if possible as it's not really something that would need to be be messed with by the translation.

A good idea might be to flag in the template the you have done this using comments. You will also need some reliable process for getting all the translation files changed if you decide to alter the emphasis ever (which you inevitably will). This is a pain, so I tend to avoid adding emphasis to individual words wherever possible :)

like image 25
Matt Gibson Avatar answered Nov 15 '22 09:11

Matt Gibson


Interesting question! The only thing I can add is that strong and em tags are only useful for SEO if the search engines connect those tags with the content on your site.

I'd recommend using these tags only if there's an actual reason (for emphasis, say) rather than hoping to gain SEO benefit from bolding or italicizing keywords.

like image 20
illbzo1 Avatar answered Nov 15 '22 09:11

illbzo1