Skip to content

Commit

Permalink
add currentLocale method
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 19, 2020
1 parent fe96aca commit 318c226
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,16 @@ public function getLocale()
return $this['config']->get('app.locale');
}

/**
* Get the current application locale.
*
* @return string
*/
public function currentLocale()
{
return $this->getLocale();
}

/**
* Get the current application fallback locale.
*
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Support/Facades/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @method static string getCachedRoutesPath()
* @method static string getCachedServicesPath()
* @method static string getLocale()
* @method static string currentLocale()
* @method static string getNamespace()
* @method static string resourcePath(string $path = '')
* @method static string storagePath(string $path = '')
Expand Down

0 comments on commit 318c226

Please sign in to comment.