Bilingual with a Face Lift

October 06, 2004

Acabé construiendo una version española del IAB sitio web. We also added a new look to the spanish version. What made this redesign easy was that all of the html structure stayed the same, all we did was switch the style sheets and ya está.

Since we first designed the site with standards changing the design was easy. We did remove and move a few lines of extra divs that were no longer needed on the main template. But other than that it was all styles sheets that powered the change. I learned that clean html code will pay off when you do make design changes like this. Will the english version take on the new look? Yes, it will change once we take the spanish version public, and all it will take will be changing a few files—style sheets are awesome!

Making the spanish version was as simple as creating an ‘es’ directory and copying all of the english files, translating them, and putting them in the ‘es’ directory. Keeping the same directory structure made it easy to switch from the english to the spanish version with the help from a little javascript. The one html change made on all of the spanish files was the html xml:lang property and the meta content type.

English
<html xmlns="http://www.w3.org/1999/xhtml" 
xml:lang="en" lang="en">
<meta http-equiv="Content-Type" 
content="text/html; charset=utf-8" />
Español
<html xmlns="http://www.w3.org/1999/xhtml"
 xml:lang="es" lang="es">
<meta http-equiv="content-type" 
content="text/html; charset=iso-8859-1" />

This helps specify the language of the content, making it easy for speech synthesis, search engine content classification and character usage. One thing you will notice with spanish is an increase in file size because of all of the special characters used.

We are not done yet but I wanted to announce this launch before it was live to the public this weekend. This way you can see the two versions, english and spanish, and the only difference being the style sheets with regards to the code. We are still working on some page content and not all pages are translated yet, but any suggestions or errors are welcomed.

Update: We pushed the spanish and english versions live. Enjoy!

Comments

James said:

Out of curiosity, why all the character entities? If the page's encoding offers the character natively, it can save you some bytes.

I guess I can see an argument for using entities in case someone comes along later and changes the meta tags or the headers the server is sending, but in that case why change the encoding from utf-8? If you're using entities for the "funny characters" I don't see any advantage to it and it breaks consistency with the English version.

Posted on Oct. 7, 2004 01:29 #

Blake Scarbrough said:

James I may go through and change them all of the entities. It would be a large search and replace and, yes save some bytes.

Posted on Oct. 7, 2004 08:47 #

sosa said:

does the translation had been made by a native spanish speaker?
Sounds a little... i don't know... weird.

Posted on Oct. 7, 2004 10:12 #

Blake Scarbrough said:

Sosa,
Creo que sí
Don't know for sure though, does it sound spanglish like?

Posted on Oct. 7, 2004 12:17 #

Rob Mientjes said:

Another pro-standards argument. It's getting so easy, it's hard to believe :P

Posted on Oct. 8, 2004 16:24 #

Dustin Diaz said:

Eh que paso,
Este articulo se mejorara mis habilidades en traduciendo paginas de ingles a espanol. Aunque no tengo clientes que hablan la lengua, esta pagina esta *bookmarked* para referencia futura.

Gracias eh.
Dustin Diaz

Posted on Nov. 4, 2004 14:07 #