[TYPO3] TemplaVoila ARABIC/HEBREW and ENGLISH in a ONE Tree TYPO3

Christopher Torgalson bedlamhotel at gmail.com
Wed Jul 11 06:38:41 CEST 2007


Hi. You make good points and give good advice generally (although I
wouldn't worry too much about browsers not supporting CSS2), but this:

On 7/10/07, Andreas Becker <ab.becker at web.de> wrote:
> Hi Oleg
>
> Normally - without TYPO3 and TemplaVoila you can work with
>
> <body id=RL>
> </body>
>
> and
>
> <body id=LR>
> </body>
>
> to do all those switching of the divs
>
> But unforyunately TemplaVoila isn't accepting anything behind the word
> "body" It won't map until the end and gets stock somewhere in the midle if
> you try it.


...if I understand you correctly, is total nonsense. There's no need
for additional 'wrapping' divs on account of Templavoila just to use
descendant selectors.

If you are working with two TV templates, just be sure to map the body
element in the template with the correct  mapping 'mode' to preserve
the original body tag--I don't recall which mode it is, but it
shouldn't be hard to figure out.

Alternatively, if you're working with one TV template and you'd like
to switch the body tag on the basis of the currently selected
language, something like this will work very well:


### Sample TS:
###
page.bodyTag = <body>
[globalVar = GP:L=1]
  page.bodyTag = <body id="rtl">
[global]


/* Sample CSS--assumes the presence of <div id="content"> in the markup: */
body #content {
  width:200px;
  float:right;
}

body#rtl #content {
  float:left;
}


If you need even more sophistication in the body tag, there is also an
option to use "page.bodyTagCObject" which can be used to make the
opening body tag with any kind of cObject at all.

As for language-dependent mappings, if your templates need to be
/very/ different, this may be a bit tricky in TV. But (as I mentioned
today elsewhere on this list), if the templates are similar except for
the placement of items, a well-designed html template, along with some
clever CSS should serve for both languages (see the extremely
simplified examples above). I have, for instance, built a site using
English, Chinese, Korean and Farsi (rtl), based on one HTML template
(not a TYPO3 site), and the ONLY absolutely necessary differences in
the markup from language to language were:

1. The value of the xml:lang and lang attributes in the html element
(if using a non-xhtml doctype, xml:lang is not needed),
2. The value of the dir attribute in the html element
3. The value of the id attribute in the body tag (and if browsers
properly supported attribute selectors, even this wouldn't be
necessary...)

-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list