Skip to content

Commit

Permalink
Version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mcamara committed Dec 24, 2015
1 parent 62dc69e commit a086769
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.1
- Added compatibility with Laravel 5.2

### 1.0.12
- Added regional for date localization

Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ Easy i18n localization for Laravel, an useful tool to combine with Laravel local

Laravel 5 is released!!

Laravel | laravel-localization
:---------|:----------
4.0.x | 0.13.x
4.1.x | 0.13.x
4.2.x | 0.15.x
5.x.x | 1.0.x
Laravel | laravel-localization
:-------------|:----------
4.0.x | 0.13.x
4.1.x | 0.13.x
4.2.x | 0.15.x
5.0.x/5.1.x | 1.0.x
5.2.x | 1.1.x

## Installation

### Composer

Add Laravel Localization to your `composer.json` file.

"mcamara/laravel-localization": "1.0.*"
"mcamara/laravel-localization": "1.1.*"

Run `composer install` to get the latest version of the package.

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["localization", "laravel", "php"],
"homepage": "https://github.com/mcamara/laravel-localization",
"license": "MIT",
"version": "1.0.12",
"version": "1.1.1",
"authors": [
{
"name": "Marc Cámara",
Expand All @@ -13,11 +13,11 @@
}
],
"require": {
"php": ">=5.4.0",
"laravel/framework": "~5.0"
"php": ">=5.5.0",
"laravel/framework": "~5.2"
},
"require-dev": {
"orchestra/testbench": "3.0.*"
"orchestra/testbench": "3.2.*"
},
"autoload": {
"classmap": [
Expand Down
6 changes: 3 additions & 3 deletions src/Mcamara/LaravelLocalization/LaravelLocalization.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function getLocalizedURL( $locale = null, $url = null, $attributes = arra
$url = $this->request->fullUrl();

}

if ( $locale && $translatedRoute = $this->findTranslatedRouteByUrl($url, $attributes, $this->currentLocale) )
{
return $this->getURLFromRouteNameTranslated($locale, $translatedRoute, $attributes);
Expand Down Expand Up @@ -499,7 +499,7 @@ public function getCurrentLocale()
*/
public function getCurrentLocaleRegional()
{
// need to check if it exists, since 'regional' has been added
// need to check if it exists, since 'regional' has been added
// after version 1.0.11 and existing users will not have it
if(isset($this->supportedLocales[ $this->getCurrentLocale() ][ 'regional' ]) )
return $this->supportedLocales[ $this->getCurrentLocale() ][ 'regional' ];
Expand Down Expand Up @@ -604,7 +604,7 @@ public function getRouteNameFromAPath( $path )
{
$attributes = $this->extractAttributes($path);

$path = str_replace(url(), "", $path);
$path = str_replace(url('/'), "", $path);
if ( $path[ 0 ] !== '/' )
{
$path = '/' . $path;
Expand Down

0 comments on commit a086769

Please sign in to comment.