How can I make flash object to be different by language choise?

ktomov

No avatar

2009-03-25 13:23

Hello there. I've made a small modification in the container.tpl, so I can get a custom header with flash. The code looks something like this:

    <div id="head2">

      <
div id="logo">

<
object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="750" height="150">

  <
param name="movie" value="design/imagenav/imagenav.swf" />

  <
param name="quality" value="high" />

  <
embed src="design/imagenav/imagenav.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="150"></embed>

</
object>

      </
div>

      <
div id="navipath">$sPagesTree</div>

    </
div>

    <
div id="head3">

      
$sMenu2



Is there any way to make it different by the language. So in english it would be imagenav.swf and in bulgaria imagenav2.swf for instance?

» Quick.Cart v3.x

cgan

Avatar: cgan

2009-03-25 13:57

ktomov - try this: make a copy of templates/container.tpl change name to e.g. container_xlang.tpl. and add your flash code for lang x. Means you change to file to imagenav2.swf. In first container.tpl you'll have flash code with imagenav.swf.
Then copy templates/theme/default.tpl and change name e.g default_xlang.tpl
In default_xlang.tpl edit this row: echo $oTpl->tbHtml( 'container.tpl', 'HEAD' ).$oTpl->tbHtml( 'container.tpl', 'BODY' ).$content.$oTpl->tbHtml( 'container.tpl', 'FOOT' );
to this:
echo $oTpl->tbHtml( 'container_xlang.tpl', 'HEAD' ).$oTpl->tbHtml( 'container.tpl', 'BODY' ).$content.$oTpl->tbHtml( 'container.tpl', 'FOOT' );
Then log in to your admin/pages/your_page and in View/Themes use default_xlang.tpl theme for your xlang files. This means you should have different themes for your different languages. Hope this will help you.

cgan

Back to top
about us | contact