PHP Classes

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)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 35 All time: 10,970 This week: 79Up
Version License PHP version Categories
laravel-url-locale 1.0.0MIT/X Consortium ...7Localization, Libraries, PHP 7


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: 37 packages by
Country: Egypt Egypt
Age: 31
All time rank: 258526 in Egypt Egypt
Week rank: 75 Up1 in Egypt Egypt Up
Innovation award
Innovation award
Nominee: 21x


<p align="center"><a href="" target="_blank"><img src=""></a></p>

<p align="center"> <a href="" target="_blank"><img src="" alt="PHP Version : >= 7.2"></a> <a href="" target="_blank"><img src="" alt="Laravel Version : >= 6.0"></a> <img src="" alt="License"> <a href="" target="_blank"><img src="" alt="Support"></a> <br> <a href="" target="_blank"><img src="" alt="Source"></a> <a href="" target="_blank"><img src="" alt="Packagist Version"></a> <a href="" target="_blank"><img src="" 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::get('/page', function(){
        return 'Pharaonic';

// Output : {locale?}/page


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


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.


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 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  
This week:0
All time:10,970
This week:79Up