I often run into the same problems with bilingual sites. Not being fond of
server calculations, I use CSS to display and hide divs and spans for English
or Dutch field labels or text.
1) two style sheets, one names nl.css with the following code:
.dEN {
display: none;
}
.dNL {
display:'';
}
the other named en.css with the oposite code:
.dNL {
display: none;
}
.dEN {
display:'';
}
2) HTML with the following code e.g. in front of the name field
3) activate one or the other style sheet by either:
- computed text that intercepts the &lan= parameter from the url
- javascript that reads the cookie (doesn't work when users disable cookies)
- javascripts that sets the style sheet based on the parent frame the html is
placed in
E.g. http://ivetesangalo.com is a prototype of a bilingual site. Based on the
ip number where you are coming from, it either redirects you to the PT page or
the EN page. The EN page contains a frameset, a javascripts selects the
isfsEN.css stylesheet that goes with it.
Nice to read an article from some Dutch authors!
I often run into the same problems with bilingual sites. Not being fond of server calculations, I use CSS to display and hide divs and spans for English or Dutch field labels or text.
1) two style sheets, one names nl.css with the following code: .dEN { display: none; }
.dNL { display:''; }
the other named en.css with the oposite code:
.dNL { display: none; }
.dEN { display:''; }
2) HTML with the following code e.g. in front of the name field
(span class="dNL")Naam(/span)(span class="dEN")Name(/span)
3) activate one or the other style sheet by either: - computed text that intercepts the &lan= parameter from the url - javascript that reads the cookie (doesn't work when users disable cookies) - javascripts that sets the style sheet based on the parent frame the html is placed in
E.g. http://ivetesangalo.com is a prototype of a bilingual site. Based on the ip number where you are coming from, it either redirects you to the PT page or the EN page. The EN page contains a frameset, a javascripts selects the isfsEN.css stylesheet that goes with it.