function in inc file not being found I put this function in my inc file  

function getLanguage(){
  $url=url() ;
  $language="";
  $pos=strpos($url,"/es");
  if ($pos===false){
    $language="en";
  }else{
    $language="es";
  }
  return $language;
}


And then I try to call that function from the module, but the module says Fatal error: Call to undefined function getLanguage()

What am I doing wrong? thanks
thank you pobtastic, this is the answer:

within the .module file you put your hooks and shared functions. Usually in the callbacks, you get to declare 'file' to point to an include for your functions to reside in a nice separate place. See api.drupal.org/api/drupal/modules%21system%21system.api.php/… and api.drupal.org/api/drupal/modules%21system%21system.api.php/… –  Pobtastic 1 hour ago