<?php
/**
 * CodeIgniter library
 *
 * @category CodeIgniter
 * @license /_licenses/untermStrich/agb_normal.pdf
 * @author Christian Koller
 * @copyright 2009 untermStrich
 * @package libraries
 * @version $Id: My_Form_validation.php 755 2010-11-11 21:03:54Z christian $
*/

if (!defined('BASEPATH')) { exit('No direct script access allowed'); }

/**
 * Add's additional functionality to the user agent class
 */
class My_user_agent extends CI_User_agent
{

    /**
     * Is a language supported
     *
     * @param   string  $lang   Language
     */
    public function supports_lang($lang)
    {
        $langs = '##'.implode('##', $this->languages()).'##';
        if (strpos($langs, '##'.strtolower($lang))===false) {
            return false;
        } else {
            return true;
        }
    }

}
