PHP Class Horde_Core_Factory_LanguageDetect, horde

Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Inheritance: extends Horde_Core_Factory_Base
ファイルを表示 Open project: horde/horde

Protected Properties

Property Type Description
$_detect Text_LanguageDetect A Text_LanguageDetect instance.
$_langmap array Language list accurate as of Text_LanguageDetect v0.2.3.

Public Methods

Method Description
create ( ) : Text_LanguageDetect Return a Text_LanguageDetect instance.
getLanguageCode ( string $text ) : string Utility method to scan a string and return the appropriate langauge code of the detected language.

Method Details

create() public method

Return a Text_LanguageDetect instance.
public create ( ) : Text_LanguageDetect
return Text_LanguageDetect Detection object.

getLanguageCode() public method

Utility method to scan a string and return the appropriate langauge code of the detected language.
public getLanguageCode ( string $text ) : string
$text string Input text.
return string The ISO 639 language code (or null if it could not be determined).

Property Details

$_detect protected_oe property

A Text_LanguageDetect instance.
protected Text_LanguageDetect $_detect
return Text_LanguageDetect

$_langmap protected_oe property

Language list accurate as of Text_LanguageDetect v0.2.3.
protected array $_langmap
return array