2012-01-30, 16:59:21
yurifanboy Wrote:<?php if ($language == 'en') { ?> All rights reserved. All images belong to their
respective owners.<?php } ?>
<?php if ($language == 'es') { ?> Todos los derechos reservados. Todas las imágenes son propiedad de sus respectivos autores.<?php } ?>
I can't seem to get the php conditionals to work so that I can use them to translate pieces of my template when I use the language switcher:
If you use this code directly in the template file, it should work. However, if you use this within a function, you need to tell PHP it's a global variable first:
Code:
global $language;
...