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    
Last Updated Ratings Unique User Downloads Download Rankings
2021-08-13 (29 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 16 All time: 10,376 This week: 97Up
Version License PHP version Categories
laravel-url-locale 1.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
Nominee
Vote
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
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:16
This week:0
All time:10,376
This week:97Up
For more information send a message to info at phpclasses dot org.