Laravel Localization Package: Detect or set the locale language of an app user

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2021-08-13 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 27 This week: 1All time: 10,332 This week: 182Up
Version License PHP version Categories
laravel-url-locale 1.0.0MIT/X Consortium ...7Localization, Libraries, PHP 7
Description Author

This package can detect or set the locale language of an app user.

It can set the locale language of the current Laravel application user to a given language.

The package also implements several methods to detect the current user locale language automatically. Currently, it can:

- Detect the language associated with the country of the application URL domain

- Detect the available locale languages from the names of the sub-directories of the Laravel application locale directory

Innovation Award
PHP Programming Innovation award nominee
August 2021
Number 7
Many applications can present the messages that are displayed to the users in different languages.

Ideally, applications should detect the user language from hints passed automatically by the user browser to the server or other details of the environment on which the Web application is running.

This package can detect automatically the language preferred by the user of a Web application based on the Laravel framework.

This way, it can automatically load the text messages to present to the application users.

Manuel Lemos
Picture of Moamen Eltouny
  Performance   Level  
Name: Moamen Eltouny <contact>
Classes: 32 packages by
Country: Egypt Egypt
Age: 28
All time rank: 287629 in Egypt Egypt
Week rank: 106 Up3 in Egypt Egypt Up
Innovation award
Innovation award
Nominee: 17x

Details

<p align="center"><a href="https://pharaonic.io" target="_blank"><img src="https://raw.githubusercontent.com/Pharaonic/logos/main/localization.jpg"></a></p>

<p align="center"> <a href="https://php.net" target="_blank"><img src="https://img.shields.io/static/v1?label=PHP&message=%3E=7.2&color=blue&style=flat-square" alt="PHP Version : >= 7.2"></a> <a href="https://laravel.com" target="_blank"><img src="https://img.shields.io/static/v1?label=Laravel&message=%3E=6.0&color=F05340&style=flat-square" alt="Laravel Version : >= 6.0"></a> <img src="https://img.shields.io/static/v1?label=License&message=MIT&color=brightgreen&style=flat-square" alt="License"> <a href="https://liberapay.com/Pharaonic" target="_blank"><img src="https://img.shields.io/liberapay/receives/Pharaonic?color=gold&label=Support&style=flat-square" alt="Support"></a> <br> <a href="https://packagist.org/packages/Pharaonic/laravel-localization" target="_blank"><img src="https://img.shields.io/static/v1?label=Packagist&message=pharaonic/laravel-localization&color=blue&logo=packagist&logoColor=white" alt="Source"></a> <a href="https://packagist.org/packages/pharaonic/laravel-localization" target="_blank"><img src="https://poser.pugx.org/pharaonic/laravel-localization/v" alt="Packagist Version"></a> <a href="https://packagist.org/packages/pharaonic/laravel-localization" target="_blank"><img src="https://poser.pugx.org/pharaonic/laravel-localization/downloads" alt="Packagist Downloads"></a> </p>

<h3 align="center">Laravel URL Localization - (ccTLD, sub-domain, sub-directory).</h3> <h5 align="center">with Simple & Easy Helpers.</h5>

Afrikaans Akan shqip ???? ??????? ??????? ??????? az?rbaycan ?????????? bamanakan euskara ?????????? ????? ???????? bosanski brezhoneg ????????? ??? catalÓ ?? ???? ???? kernewek hrvatski ?e?tina dansk Nederlands ?????? English Esperanto eesti e?egbe f°royskt suomi franšais Pulaar galego Luganda ??????? Deutsch ???????? ??????? Hausa ????? ?????? magyar Ýslenska Igbo Bahasa Indonesia Gaeilge italiano ??? kalaallisut ????? ????? ????? ???? ????? Gikuyu Kinyarwanda ??? ???????? ??? latvie?u lingßla lietuvi? Tshiluba LŰtzebuergesch ?????????? Malagasy Bahasa Melayu ?????? Malti Gaelg ????? ?????? ?????? isiNdebele davvisßmegiella norsk norsk bokmňl nynorsk ????? Oromoo ???? ???? ????? polski portuguŕs ?????? ?????? Runasimi romÔn? rumantsch Ikirundi ??????? Sńng÷ GÓidhlig ?????? srpski Srpskohrvatski chiShona ??? ????? sloven?ina sloven??ina Soomaali espa˝ol Kiswahili svenska Tagalog ????? ?????? ??? ???????? ???? lea fakatonga TŘrkše ?????????? ???? ???????? o?zbekcha Ti?ng Vi?t Cymraeg West-Frysk ?????? ╚dŔ Yor¨bß isiZulu <br> <h6>Sub-Directory Localzation Routing Example :</h6>

Route::localized(function(){
    Route::get('/page', function(){
        return 'Pharaonic';
    });
});

// Output : {locale?}/page

Documentation

You can find the detailed documentation here in Laravel Localization Documentation.

Contributing

Thank you for considering contributing to this package! Be one of Pharaonic team.

Pharaonic Sponsors

We would like to extend our thanks to the following sponsors for funding Pharaonic packages development. If you are interested in becoming a sponsor, please visit the Pharaonic Liberapay page or Patreon page.

License

This package is an open-sourced software licensed under the MIT license.

  Files folder image Files  
File Role Description
Files folder image.github (1 file)
Files folder imagesrc (3 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
  Accessible without login Plain text file FUNDING.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageClasses (1 file)
  Accessible without login Plain text file config.php Aux. Auxiliary script
  Accessible without login Plain text file helpers.php Example Example script
  Plain text file LocalizationServiceProvider.php Class Class source

  Files folder image Files  /  src  /  Classes  
File Role Description
  Plain text file Localization.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:27
This week:1
All time:10,332
This week:182Up
For more information send a message to info at phpclasses dot org.