I have 2 landing pages in Russian and Hebrew in the blog that is totally in English.
Should I insert some language tags in to the HTML page?
If yes, what tags and where?
Thanks,
Vadim
| SitePoint Sponsor |
I have 2 landing pages in Russian and Hebrew in the blog that is totally in English.
Should I insert some language tags in to the HTML page?
If yes, what tags and where?
Thanks,
Vadim




I usually use the html lang attribute.
Code:<html lang="en">
My page starts like this:
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>שירות, תיקונים ותחזוקת מחשבים בתל אביב, ישראל</title>
Should I insert it into the first line like that:
<html lang="he" xmlns="http://www.w3.org/1999/xhtml">
The page is here:
http://repairpcguide.com/pc-repair-service/he/
Thanks,
Vadim




Yep correct. If the whole page is in Hebrew, otherwise you can use the lang attribute on other elements as well.
More info: http://www.w3.org/TR/REC-html40/struct/dirlang.html


In your case, you should use both the lang and xmllang attributes in your HTML opening tag along with the META content language tag.
HTML Code:<html xmlns="http://www.w3.org/1999/xhtml" lang="iw" xml:lang="iw">For the sections of the page that have English (like your search form), add the lang="en" attribute. I also recommend you remove the Wordpress generator tag from your header.php file as well - you don't want scripts sniffing to see what version of WordPress you're using and then hacking into it.HTML Code:<meta http-equiv="content-language" content="iw" />
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
Dan thanks a lot, it was of great help!
But isn't "IW" obsolete?
Nowadays Hebrew language use "HE" attribute, isn't it?
Regarding contact form where exactly should I insert it? Should it be like this:For the sections of the page that have English (like your search form), add the lang="en" attribute. I also recommend you remove the Wordpress generator tag from your header.php file as well - you don't want scripts sniffing to see what version of WordPress you're using and then hacking into it.
<a lang="en" href="/contact-us/" target="_blank">או שלח אי-מייל </a>
Thanks again
Vadim


The SitePoint Reference has IW as the current listing. If HE is now being used, then by all means go ahead and use it.
The attribute would be put in the the tag that has the English content on it.
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns


According to ISO 639-2 the language code for Hebrew is 'heb' (or 'he' in ISO 639-1).
Birnam wood is come to Dunsinane


That settles it then. Time to update the SitePoint Reference...![]()
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
Thanks guys!
Can you check the source code and see whether or not I should remove or change something?
Thank you very much
Vadim
Bookmarks