<div dir="ltr"><div>Quick and simple:</div><div>is there a way to get the active language user is viewing site in template.php, sth like $language->language in page.tpl.php? <br clear="all"></div><div><br></div><div>I want to use it in a condition like this:</div>
<div>function rouzdarou_breadcrumb($breadcrumb) {<br></div><div><br></div><div>if(arg(0) == 'news'){<br> global $base_url;<br> if($language->language=='en'):<br> $breadcrumb[0] = l('Home', $base_url);<br>
$breadcrumb[1] = l('News', 'news');</div><div> endif;<br> }<br> return theme_breadcrumb($breadcrumb);<br>}</div><div><br></div><div><br></div><div>but dsm($language->language); returns nothing in template.php. If any1 knows another way to achieve this share :)</div>
<div>Thanks in advanced. </div><div><br></div>-- <br><div dir="ltr">Pooya Sanooei<br><div><a href="http://twitter.com/sourcesoft" target="_blank">Twitter</a> - <a href="http://facebook.com/pooya.sanooei" target="_blank">Facebook</a> - <a href="http://www.sanooei.com" target="_blank">Website</a></div>
</div><br>
</div>