WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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.