function bogo_get_language($locale)
{
    $languages = bogo_languages();
    if (isset($languages[$locale])) {
        return $languages[$locale];
    }
    return null;
}
function bogo_init()
{
    bogo_languages();
    if (!(is_admin() || is_robots() || is_feed() || is_trackback())) {
        $locale = get_locale();
        if (!isset($_COOKIE['lang']) || $_COOKIE['lang'] != $locale) {
            setcookie('lang', $locale, 0, '/');
        }
    }
}