Giter Site home page Giter Site logo

rinvex / languages Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 15.0 166 KB

Rinvex Language is a simple and lightweight package for retrieving language details with flexibility. A whole bunch of data including name, native, iso codes, language family, language script, language cultures, and other attributes for the 180+ known languages worldwide at your fingertips.

License: MIT License

PHP 100.00%
language php

languages's People

Contributors

dependabot-preview[bot] avatar omranic avatar rattone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

languages's Issues

Languages discrepency between this package and rinvex/countries

We use both this repo and rinvex/countries in different capacities and have noticed that there are 41 languages in rinvex/countries that are not present in this repo.

    [arc] => Aramaic
    [bar] => Austro-Bavarian German
    [bjz] => Belizean Creole
    [ber] => Berber
    [cal] => Carolinian
    [bwg] => Chibarwe
    [zdj] => Comorian
    [rar] => Cook Islands Māori
    [prs] => Dari
    [hif] => Fiji Hindi
    [fil] => Filipino
    [gil] => Gilbertese
    [nfr] => Guernésiais
    [mey] => Hassaniya
    [jam] => Jamaican Patois
    [nrf] => Jèrriais
    [kck] => Kalanga
    [hgm] => Khoekhoe
    [khi] => Khoisan
    [kwn] => Kwangali
    [loz] => Lozi
    [cmn] => Mandarin
    [mfe] => Mauritian Creole
    [ndc] => Ndau
    [nzs] => New Zealand Sign Language
    [niu] => Niuean
    [pih] => Norfuk
    [nso] => Northern Sotho
    [pau] => Palauan
    [pap] => Papiamento
    [smi] => Sami
    [crs] => Seychellois Creole
    [ckb] => Sorani
    [gsw] => Swiss German
    [tet] => Tetum
    [tpi] => Tok Pisin
    [tkl] => Tokelauan
    [toi] => Tonga
    [lua] => Tshiluba
    [tvl] => Tuvaluan
    [zib] => Zimbabwean Sign Language

I suppose you could argue about some above but Mandarin is spoken by almost a billion people and should probably be included in this repo's list.

Thank you for supporting both repos!

Is your lib supposed to accept culture in constructor?

If I try to parse the string "pt-BR", I get an error saying that the language code may be misspelled, invalid, ...
I've tried with pt_BR, en-US, en_US, etc. without success.

<?php
require "./vendor/autoload.php";
use Rinvex\Language\LanguageLoader;

$language = language('en');
echo "OK for en" . PHP_EOL;
$language = language('en-US');  //Not accepted by the constructor, it generates an exception.

I have to develop this code:

<?php
require "./vendor/autoload.php";
use Rinvex\Language\LanguageLoader;

$languageCode = 'pt-BR';
$nativeName = '';
$pieces = explode("-", $languageCode);
$language = language($pieces[0]);
if (count($pieces) == 1) {
	$nativeName = $language->getNativeName();
} else {
	$cultureInfo = $language->getCulture($languageCode);
$nativeName = $cultureInfo['native'];
}
echo "Language is $nativeName" . PHP_EOL;

It looks weird to me. You should accept the culture in the constructor and then populate the culture info, if any.

Thank you!

You helped me a lot with your composer packages! Thanks!

Php 5.6 backport

Hi @Omranic,

This package is incredibly useful, and could potentially be something that can make a lot of people happy. I've created a backport to php 5.6 because some of us are still stuck on php 5.6 for some time due to "constraints".

In any case, it might be worthwhile mentioning this backport on your page to save potential users from having to do the port themselves :)

Thanks for the great package!

https://github.com/wubbajack/language

Missing Austria language

Hello Support Team
on languages.json file, i don't see language and information for the Austria country, can you please do some checks?
Thank you

Readme shows wrong php version compared to composer.json

Rinvex Language is framework-agnostic, so it's compatible with any PHP framework whatsoever without any dependencies at all, except for the PHP version itself ^7.0.0. Awesome, huh?

Should be updated to

^7.1.3

According to the composer.json file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.