PHP Classes

File: src/helpers.php

Recommend this page to a friend!
  Classes of Moamen Eltouny   Laravel Localization Package   src/helpers.php   Download  
File: src/helpers.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Laravel Localization Package
Detect or set the locale language of an app user
Author: By
Last change:
Date: 2 years ago
Size: 236 bytes
 

Contents

Class file image Download
<?php

/**
 * Getting Localization Object
 *
 * @param string $locale
 * @return Pharaonic\Laravel\Localization\Classes\Localization
 */
function locale(string $locale = null)
{
    return
app('Localization')->setTempLocale($locale);
}