FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19221&edit=1

ID: 19221
Updated by: cweiske@php.net
Reported By: cweiske at php dot net
Summary: Return ISO 639-1 or ISO 639-2 language codes
Status: Open
Type: Feature/Change Request
Package: Text_LanguageDetect
Package Version: SVN
PHP Version: HEAD SVN-2012-01-13
Roadmap Versions:
New Comment:

Also see http://perl.active-venture.com/lib/Locale/Country.html


Previous Comments:
------------------------------------------------------------------------

[2012-01-13 09:33:05] cweiske

Description:
------------
Currently Text_LanguageDetect returns language names only. It'd be nice
if it would return ISO 639-1 (2-letter) and ISO 639-2 (3-letter)
language codes.

I imagine an API like this:
$l = new Text_LanguageDetect();
$l->setLangFormat(Text_LanguageDetect::ALPHA_2);
$l->detect($text, 4);

The tricky part is probably that *all* methods would need to accept and
output such codes.

------------------------------------------------------------------------

Search Discussions

  • Cweiske at Jan 13, 2012 at 8:33 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19221&edit=1

    ID: 19221
    Updated by: cweiske@php.net
    Reported By: cweiske at php dot net
    Summary: Return ISO 639-1 or ISO 639-2 language codes
    Status: Open
    Type: Feature/Change Request
    Package: Text_LanguageDetect
    Package Version: SVN
    PHP Version: HEAD SVN-2012-01-13
    Roadmap Versions:
    New Comment:

    And http://www.loc.gov/standards/iso639-2/php/code_list.php


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-01-13 09:33:33] cweiske

    Also see http://perl.active-venture.com/lib/Locale/Country.html

    ------------------------------------------------------------------------

    [2012-01-13 09:33:05] cweiske

    Description:
    ------------
    Currently Text_LanguageDetect returns language names only. It'd be nice
    if it would return ISO 639-1 (2-letter) and ISO 639-2 (3-letter)
    language codes.

    I imagine an API like this:
    $l = new Text_LanguageDetect();
    $l->setLangFormat(Text_LanguageDetect::ALPHA_2);
    $l->detect($text, 4);

    The tricky part is probably that *all* methods would need to accept and
    output such codes.

    ------------------------------------------------------------------------
  • Cweiske at Jan 16, 2012 at 8:52 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19221&edit=1

    ID: 19221
    Updated by: cweiske@php.net
    Reported By: cweiske at php dot net
    Summary: Return ISO 639-1 or ISO 639-2 language codes
    -Status: Open
    +Status: Closed
    Type: Feature/Change Request
    Package: Text_LanguageDetect
    Package Version: SVN
    PHP Version: HEAD SVN-2012-01-13
    -Assigned To:
    +Assigned To: cweiske
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: cweiske
    Thank you for your bug report. This issue has been fixed
    in the latest released version of the package, which you can download at
    http://pear.php.net/get/

    Fixed in 0.3.0


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-01-13 09:33:52] cweiske

    And http://www.loc.gov/standards/iso639-2/php/code_list.php

    ------------------------------------------------------------------------

    [2012-01-13 09:33:33] cweiske

    Also see http://perl.active-venture.com/lib/Locale/Country.html

    ------------------------------------------------------------------------

    [2012-01-13 09:33:05] cweiske

    Description:
    ------------
    Currently Text_LanguageDetect returns language names only. It'd be nice
    if it would return ISO 639-1 (2-letter) and ISO 639-2 (3-letter)
    language codes.

    I imagine an API like this:
    $l = new Text_LanguageDetect();
    $l->setLangFormat(Text_LanguageDetect::ALPHA_2);
    $l->detect($text, 4);

    The tricky part is probably that *all* methods would need to accept and
    output such codes.

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 13, '12 at 8:32a
activeJan 16, '12 at 8:52a
posts3
users1
websitepear.php.net

1 user in discussion

Cweiske: 3 posts

People

Translate

site design / logo © 2022 Grokbase