Welcome, Guest. Please Login or Register.
July 13, 2025, 12:30:09 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  Multi language template « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Multi language template  (Read 375 times)
kiboost
Jr. Member
**
Posts: 58


Enjoy your life !!

ICQ - 60784747 WWW
Multi language template
« on: April 30, 2003, 09:38:40 AM »
Reply with quote

Greetings ,-)

I got a 1.5.1 board, and it's nice to allow users to choose their language for menus etc. BUT, is it possible to get different template for each language ? My board template include my website menubar, and it could be really cool if english had the englishmenubar and the french the frenchone (to jump to french pages of the website etc)

Hope someone it's possible  ;)

Kib
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Multi language template
« Reply #1 on: April 30, 2003, 10:09:58 AM »
Reply with quote

suggestion: move all the strings/texts in your template.php to english.lng and other language files
then in the template, use echo or print to get the value
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
kiboost
Jr. Member
**
Posts: 58


Enjoy your life !!

ICQ - 60784747 WWW
Re:Multi language template
« Reply #2 on: April 30, 2003, 11:55:45 AM »
Reply with quote

Hey thanks ! You make me happy as it seems possible  :D
Anyway, could you be more precise on the code ? I don't know many things at coding, please tell me which portion of code I should put where, as template is html and language file php ?
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Multi language template
« Reply #3 on: April 30, 2003, 03:59:27 PM »
Reply with quote

i see from the link to your site that you're using image navigation with on mouse over image swap
this means you will also need to create the english images, right?
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
kiboost
Jr. Member
**
Posts: 58


Enjoy your life !!

ICQ - 60784747 WWW
Re:Multi language template
« Reply #4 on: April 30, 2003, 04:07:20 PM »
Reply with quote

You may have seen breizhskiff.com, but I need this functionnality for my personnal site : http://www.kicrea.com/forums/index.php

;)

Kib
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Multi language template
« Reply #5 on: April 30, 2003, 04:49:31 PM »
Reply with quote

try this:
in english.lng (and other .lng files that u want to use english nav), put this in a new line, example: before $txt['newmessages0'] = 'is';$txt['sitemenu'] = <<<EOT
<body bgcolor="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#000000" onLoad="MM_preloadImages('http://www.kicrea.com/img/menu_fr/design_o.gif', 'http://www.kicrea.com/img/menu_fr/archi_o.gif','http://www.kicrea.com/img/menu_fr/articles_o.gif', 'http://www.kicrea.com/img/menu_fr/services_o.gif','http://www.kicrea.com/img/menu_fr/contact_o.gif', 'http://www.kicrea.com/img/menu_fr/client_o.gif','http://www.kicrea.com/img/menu_us/archi_nav_o.gif')" >
<div align="center">
 <table width="775" border="0" cellspacing="0" cellpadding="0">
   <tr>
     <td colspan="8"><img src="http://www.kicrea.com/img/interface_us/top_us.jpg" width="775" height="65" border="0" usemap="#Map"><a href="http://www.">
       <map name="Map">
         <area shape="rect" coords="668,42,769,61" href="#" onClick="history.back()" alt="Go back to previous page" title="Go back to previous page">

         <area shape="rect" coords="6,9,145,59" href="http://www.kicrea.com/index_us.php3" alt="Home page" title="Home page" target="_parent">
         <area shape="rect" coords="718,6,769,33" href="http://www.kicrea.com/index.php3" alt="Version francaise" title="Version francaise">
       </map>
       </a></td>
   </tr>
   <tr>
     <td width="50"><a href="http://www.kicrea.com/design/index_us.php3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('design','','http://www.kicrea.com/img/menu_fr/design_o.gif',1)"><img name="design" border="0" src="http://www.kicrea.com/img/menu_fr/design_n.gif" width="94" height="26" alt="Images made for design and communication."></a></td>
     <td width="50"><a href="http://www.kicrea.com/architecture/index_us.php3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('archi','','http://www.kicrea.com/img/menu_fr/archi_o.gif',1)"><img name="archi" border="0" src="http://www.kicrea.com/img/menu_fr/archi_n.gif" width="89" height="26" alt="Images made for architects"></a></td>
     <td width="50"><a href="http://www.kicrea.com/archi_navale/index_us.php3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('archi_nav','','http://www.kicrea.com/img/menu_us/archi_nav_o.gif',1)"><img name="archi_nav" border="0" src="http://www.kicrea.com/img/menu_us/archi_nav_n.gif" width="87" height="26" alt="Images for navals architects and skippers."></a></td>

     <td width="50"><a href="http://www.kicrea.com/articles/index_us.php3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('articles','','http://www.kicrea.com/img/menu_fr/articles_o.gif',1)"><img name="articles" border="0" src="http://www.kicrea.com/img/menu_fr/articles_n.gif" width="106" height="26" alt="Articles for CGArtists."></a></td>
     <td width="50"><img src="http://www.kicrea.com/img/menu_fr/separator.gif" width="128" height="26" name="Separator"></td>
     <td width="50"><a href="http://www.kicrea.com/services/index_us.php3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('services','','http://www.kicrea.com/img/menu_fr/services_o.gif',1)"><img name="services" border="0" src="http://www.kicrea.com/img/menu_fr/services_n.gif" width="89" height="26" alt="Freelance services"></a></td>
     <td width="50"><a href="http://www.kicrea.com/contact/index_us.php3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','http://www.kicrea.com/img/menu_fr/contact_o.gif',1)"><img name="contact" border="0" src="http://www.kicrea.com/img/menu_fr/contact_n.gif" width="89" height="26" alt="How to find me !"></a></td>
     <td width="50"><a href="http://www.kicrea.com/forums/index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('client','','http://www.kicrea.com/img/menu_us/client_o.gif',1)"><img name="client" border="0" src="http://www.kicrea.com/img/menu_us/client_n.gif" width="93" height="26" alt="Customers secured aera."></a></td>
   </tr>
 </table>
</div>
EOT;
for french.lng , change the HTML code with the frech version of images & alt texts

then in your forum template, replace the <body tag with this:
<?php echo "Template:<br>" . $txt['sitemenu']; ?>


btw, you have double </body> and </html> close tag in your template
« Last Edit: April 30, 2003, 06:52:39 PM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
kiboost
Jr. Member
**
Posts: 58


Enjoy your life !!

ICQ - 60784747 WWW
Re:Multi language template
« Reply #6 on: April 30, 2003, 05:36:38 PM »
Reply with quote

Hey thanks !!! I will try that asap and let you know what happend  :D
Many thanks !

Kib
Logged
kiboost
Jr. Member
**
Posts: 58


Enjoy your life !!

ICQ - 60784747 WWW
Re:Multi language template
« Reply #7 on: May 06, 2003, 01:08:48 PM »
Reply with quote

Ok, just made what you said ! I've not replace all the template body tag (Or I lost all other modifs in the template, and yabb menu, etc) but remove the include and put the echo command. And ALL WORKS NICE

Many thanks !!!!  :D

Kib
« Last Edit: May 06, 2003, 01:26:02 PM by kiboost » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Multi language template « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.109 seconds with 21 queries.