[TYPO3] Website title in different languages

Christopher Torgalson bedlamhotel at gmail.com
Tue Jul 10 18:36:41 CEST 2007


On 7/10/07, Jan Bednarik <info at bednarik.org> wrote:
> Hi,
> > If you use different template for each language you can set the "Website
> > title" field for each template (in the "whole template record" of the
> > template).
> how can you set different templates for different languages but on one page?

Well, if you design your HTML and CSS well, you could make /many/
changes by just changing the body tag:

### Sample TS:
page.bodyTagCObject = HTML
page.bodyTagCObject {
  value = default
  value {
    wrap = <body id="|">

[globalVar = GP:L=1]
  page.bodyTagCObject.value = french
[globalVar = GP:L=2]
  page.bodyTagCObject.value = german

<!-- Sample HTML -->

<div id="content">
  Lorem ipsum dolor sit amet consectetuer.

/* Sample CSS: */

#content {
  border:2px solid #000;
  position:absolute; /* Position this div at 0,0 */

#french #content {
  bottom:0; /* Position this div at 0, 100% */

#german #content {
   right:0; /* Position this div at 100%, 0 */

Using the same principle--varying TS rendering according to the
user-selected language--it would be quite easy to change the entire
page layout if using the TEMPLATE cObject method of templating pages.
I don't immediately see a way to do the same with TV templating, but I
bet it /can/ be done with TV too.

The same principle goes for absolutely /anything/ that you can do with
TS in the first place...

Christopher Torgalson

More information about the TYPO3-english mailing list