Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to do something like this:

<?php $bloginfo = get_bloginfo( 'language' );
  if($bloginfo->en-US){
     the_time('jS F Y');
  }else{ the_time('d/m/Y');
  };
 ?>

I cant find the proper way to wrap en-US. Any ideas? Thank you in advance, people.

share|improve this question
add comment

1 Answer 1

get_bloginfo returns strings so this works fine:

<?php 
$language = get_bloginfo( 'language' );
if(language == 'en-US')
    the_time('jS F Y');
else
    the_time('d/m/Y');
?>
share|improve this answer
    
Thank you, Bainternet.(:D -1 question, im such a noob). By the way, I had to add $ to the var on the if statement to make it work (of course u know it). Thx again. –  luprates Apr 3 '12 at 0:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.