1. Go to this page and download the library: Download rinvex/languages library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rinvex / languages example snippets
// Get single language
$english = language('en');
// Get language name: English
echo $english->getName();
// Get language native name: English
echo $english->getNativeName();
// Get language ISO 639-1 code: en
echo $english->getIso6391();
// Get language ISO 639-2 code: eng
echo $english->getIso6392();
// Get language ISO 639-3 code: eng
echo $english->getIso6393();
// Get language script details: {"name": "Latin","iso_15924": "Latn","iso_numeric": "215","direction": "ltr"}
echo $english->getScript();
// Get language script name: Latin
echo $english->getScriptName();
// Get language script ISO 15924 code: Latn
echo $english->getScriptIso15924();
// Get language script ISO numeric code: 215
echo $english->getScriptIsoNumeric();
// Get language script direction: ltr
echo $english->getScriptDirection();
// Get language family details: {"name": "Indo-European","iso_639_5": "ine","hierarchy": "ine"}
echo $english->getFamily();
// Get language family name: Indo-European
echo $english->getFamilyName();
// Get language family ISO 6395 code: ine
echo $english->getFamilyIso6395();
// Get language family hierarchy: ine
echo $english->getFamilyHierarchy();
// Get language scope: individual
echo $english->getScope();
// Get language type: living
echo $english->getType();
// Get language cultures: {"en-US": {"name": "English (United States)","native": "English (United States)"}, {...}}
echo $english->getCultures();
// Get language specific culture: {"name": "English (United States)","native": "English (United States)"}
echo $english->getCulture('en-US');
// Get all languages
$languages = languages();
// Get all language scripts
$language_scripts = language_scripts();
// Get all language families
$language_families = language_families();
// Get languages with where condition (language script: Latin)
$whereLanguages = \Rinvex\Language\LanguageLoader::where('script.name', 'Latin');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.