[dev] Auto Detect Language (with patch)

Jon Parise jon at horde.org
Tue Sep 30 21:18:29 PDT 2003


On Mon, Sep 29, 2003 at 06:29:14PM -0400, Mike Pelley wrote:

> +                /* Strip quality value for language */
> +                if (($pos = strpos($lang, ';')) !== false) {
> +                        $lang = substr($lang, 0, $pos);
> +                }

My only gripe is that you're not so much stripping the quality value
from the string but extracting the language identifier from before the
semicolon.  The comment should be updated accordingly.

Other than that, the code looks good (although I haven't tested it).

-- 
Jon Parise (jon at horde.org) :: The Horde Project (http://horde.org/)


More information about the dev mailing list