I am wondering what the best way to develop a site that is going to be targeted at Brazil. Being from the US i have always used the meta information like below
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-language" content="en-US" />
Does any of this need to change?
I have seen in a few posts that you should do something like
<html lang="es">
and
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Does anyone have any experience with sites from outside the US and what type of meta data is need for all the special Spanish characters.
UPDATE
Taking some of the advice below i have realized that this is actually Portuguese not Spanish and have done some research and it looks most sites still use
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
And a combination of these
<html lang="pt-BR" xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br">
<meta name="language" content="pt-br" />
<meta http-equiv="Content-Language" content="pt-br" />
You don’t need any special meta tags.
You can specify the language of the content and the character encoding of the document. But you can (and should) do this for every site, even those with English content.
Assuming HTML5:
You specify the language with the lang
attribute. If the whole page is in a certain language, just add it to the html
element:
<html lang="pt-BR"> <!-- for Brazilian Portuguese -->
You specify the character encoding with the meta
element and its charset
attribute:
<meta charset="utf-8"> <!-- for UTF-8 -->
(Of course you need to specify the actual encoding used; so only use the value utf-8
if your documents use UTF-8.)