Re: does the systemLanguage attribute apply to tspan? alternatively does the switch element take x & y coordinates?

Hi, Jonathan-

Doug Schepers wrote:
 >
 >  > does the systemLanguage attribute apply to tspan?
 >
 > A more pertinent question is whether the 'switch' element can be a
 > child of the 'text' element.

I forgot to mention that the systemLanguage attribute, by itself, can 
selectively hide or show any graphical element ('tspan' included).  If 
not a child of a 'switch' element, however, it cannot supply a fallback. 
  For example, as per spec, this snippet will always show 'games', and 
for those devices with Italian, French, Spanish, or German as the system 
language, it will also show the given word (so it will say, "juegos 
games" for a Spanish user:

    <text x="130" y="65">
       <tspan systemLanguage="it">giochi</tspan>
       <tspan systemLanguage="fr">jeux</tspan>
       <tspan systemLanguage="es">juegos</tspan>
       <tspan systemLanguage="de">spiele</tspan>
       <tspan>games</tspan>
    </text>

You could filter this out by adding another systemLanguage attribute:

    <text x="130" y="65">
       <tspan systemLanguage="it">giochi</tspan>
       <tspan systemLanguage="fr">jeux</tspan>
       <tspan systemLanguage="es">juegos</tspan>
       <tspan systemLanguage="de">spiele</tspan>
       <tspan systemLanguage="en">games</tspan>
    </text>

But this would not display anything at all for someone with e.g. 'ja' 
(or even 'en-gb'!) as their system language. Ideally, you'd want the 
fallback, which is why I recommended using it with 'switch'.

Also note that FF1.5 doesn't implement systemLanguage as a standalone 
conditional, either (though O9 and ASV3 do).

I would stick with the <g><switch> combo for your uses, as it works in FF.

Regards-
-Doug

Research and Standards Engineer
6th Sense Analytics
www.6thsenseanalytics.com
mobile: 919.824.5482

Received on Wednesday, 14 March 2007 04:25:49 UTC