~marnanel/joule/twitter

« back to all changes in this revision

Viewing changes to lib/Joule/Language.pm

  • Committer: Thomas Thurman
  • Date: 2009-04-21 01:58:14 UTC
  • Revision ID: tthurman@genesius-20090421015814-4m8uevuep1nbic0x
ensure defined

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    # Else, guess via languages_in_countries
55
55
 
56
56
    my $country = $geolocation->inet_atocc($r->connection->remote_ip);
57
 
    return $languages_in_countries{$country} if $languages_in_countries{$country};
 
57
    return $languages_in_countries{$country} if $country && $languages_in_countries{$country};
58
58
 
59
59
    # Else give up and use English.
60
60
    return 'en';