View Full Version : page template - problem multilingualism
Cyclist
16th of April 2004 (Fri), 03:32
I am trying to adapt the page templates to my website and I am facing a little problem due to the multilingualism of my website. Every page contains the name of the category of the website. If the user is browsing through images that means he or she is currently in category images. But if language is other than English the category name should be “Bilder” (German) or “Immagini” (Italian) respectively. I suppose I have to include some php code but since I am a beginner to php I don’t know how to code it. By the way: the category names are inserted as image file (*.png). Any ideas how to solve my problem ??? :?:
Pekka
16th of April 2004 (Fri), 12:30
I am trying to adapt the page templates to my website and I am facing a little problem due to the multilingualism of my website. Every page contains the name of the category of the website. If the user is browsing through images that means he or she is currently in category images. But if language is other than English the category name should be “Bilder” (German) or “Immagini” (Italian) respectively. I suppose I have to include some php code but since I am a beginner to php I don’t know how to code it. By the way: the category names are inserted as image file (*.png). Any ideas how to solve my problem ??? :?:
Are these EE's categories or website categories?
A simple code example how to switch print statements by languages:
switch ($lang) {
case "eng":
print "<img src = \"path/image_eng.png\">";
break;
case "ita":
print "<img src = \"path/image_ita.png\">";
break;
case "fra":
print "<img src = \"path/image_fra.png\">";
break;
default:
print "<img src = \"path/image_eng.png\">";
}
You can always make your life easier and just use the translated texts (if they are from EE) - if you want a really dynamic solution then convert the texts to images using imagemagick, on the fly.
Cyclist
16th of April 2004 (Fri), 12:43
thanks Pekka, it's working. I was referring to website categories.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.