2017 © Pedro Peláez
 

library php-string-script-language

Detect language/encoding of a string in PHP

image

lasserafn/php-string-script-language

Detect language/encoding of a string in PHP

  • Monday, October 2, 2017
  • by lasserafn
  • Repository
  • 2 Watchers
  • 3 Stars
  • 13,722 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 36 % Grown

The README.md

Determine Language Script of Strings

Detect if a string contains different language scripts with a simple API., (*1)

Build Status Coverage StyleCI Status Total Downloads Latest Stable Version License , (*2)

Installation

You just require using composer and you're good to go!, (*3)

composer require lasserafn/php-string-script-language

Usage

As with installation, usage is quite simple:, (*4)

use LasseRafn\StringScript;

StringScript::isThai('Hello world.'); // false
StringScript::isChinese('你好世界。'); // true

All methods return a boolean value., (*5)

Supported scripts

  • Common
  • Arabic
  • Armenian
  • Bengali
  • Bopomofo
  • Braille
  • Buhid
  • Canadian Aboriginal
  • Cherokee
  • Cyrillic
  • Devanagari
  • Ethiopic
  • Georgian
  • Greek
  • Gujarati
  • Gurmukhi
  • Han
  • Hangul
  • Hanunoo
  • Hebrew
  • Hiragana
  • Inherited
  • Kannada
  • Katakana
  • Khmer
  • Lao
  • Latin
  • Limbu
  • Malayalam
  • Mongolian
  • Myanmar
  • Ogham
  • Oriya
  • Runic
  • Sinhala
  • Syriac
  • Tagalog
  • Tagbanwa
  • TaiLe
  • Tamil
  • Telugu
  • Thaana
  • Thai
  • Tibetan
  • Yi
  • Chinese (Helper for Han)
  • Japanese (Helper for Hiragana or Katakana)

All methods

StringScript::isCommon($string);
StringScript::isArabic($string);
StringScript::isArmenian($string);
StringScript::isBengali($string);
StringScript::isBopomofo($string);
StringScript::isBraille($string);
StringScript::isBuhid($string);
StringScript::isCanadian_Aboriginal($string);
StringScript::isCherokee($string);
StringScript::isCyrillic($string);
StringScript::isDevanagari($string);
StringScript::isEthiopic($string);
StringScript::isGeorgian($string);
StringScript::isGreek($string);
StringScript::isGujarati($string);
StringScript::isGurmukhi($string);
StringScript::isHan($string);
StringScript::isHangul($string);
StringScript::isHanunoo($string);
StringScript::isHebrew($string);
StringScript::isHiragana($string);
StringScript::isInherited($string);
StringScript::isKannada($string);
StringScript::isKatakana($string);
StringScript::isKhmer($string);
StringScript::isLao($string);
StringScript::isLatin($string);
StringScript::isLimbu($string);
StringScript::isMalayalam($string);
StringScript::isMongolian($string);
StringScript::isMyanmar($string);
StringScript::isOgham($string);
StringScript::isOriya($string);
StringScript::isRunic($string);
StringScript::isSinhala($string);
StringScript::isSyriac($string);
StringScript::isTagalog($string);
StringScript::isTagbanwa($string);
StringScript::isTaiLe($string);
StringScript::isTamil($string);
StringScript::isTelugu($string);
StringScript::isThaana($string);
StringScript::isThai($string);
StringScript::isTibetan($string);
StringScript::isYi($string);
StringScript::isChinese($string);
StringScript::isJapanese($string);

Requirements

  • PHP 5.6, 7.0 or 7.1

The Versions

02/10 2017

dev-master

9999999-dev

Detect language/encoding of a string in PHP

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0|^7.1

 

The Development Requires

language php string

02/10 2017

0.2

0.2.0.0

Detect language/encoding of a string in PHP

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0|^7.1

 

The Development Requires

language php string

02/10 2017

0.1

0.1.0.0

Detect language/encoding of a string in PHP

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0|^7.1

 

The Development Requires

language php string