Skip to content

Commit a086769

Browse files
author
mcamara
committed
Version 1.1
1 parent 62dc69e commit a086769

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 1.1
2+
- Added compatibility with Laravel 5.2
3+
14
### 1.0.12
25
- Added regional for date localization
36

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@ Easy i18n localization for Laravel, an useful tool to combine with Laravel local
2828

2929
Laravel 5 is released!!
3030

31-
Laravel | laravel-localization
32-
:---------|:----------
33-
4.0.x | 0.13.x
34-
4.1.x | 0.13.x
35-
4.2.x | 0.15.x
36-
5.x.x | 1.0.x
31+
Laravel | laravel-localization
32+
:-------------|:----------
33+
4.0.x | 0.13.x
34+
4.1.x | 0.13.x
35+
4.2.x | 0.15.x
36+
5.0.x/5.1.x | 1.0.x
37+
5.2.x | 1.1.x
3738

3839
## Installation
3940

4041
### Composer
4142

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

44-
"mcamara/laravel-localization": "1.0.*"
45+
"mcamara/laravel-localization": "1.1.*"
4546

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

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"keywords": ["localization", "laravel", "php"],
55
"homepage": "https://github.com/mcamara/laravel-localization",
66
"license": "MIT",
7-
"version": "1.0.12",
7+
"version": "1.1.1",
88
"authors": [
99
{
1010
"name": "Marc Cámara",
@@ -13,11 +13,11 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.4.0",
17-
"laravel/framework": "~5.0"
16+
"php": ">=5.5.0",
17+
"laravel/framework": "~5.2"
1818
},
1919
"require-dev": {
20-
"orchestra/testbench": "3.0.*"
20+
"orchestra/testbench": "3.2.*"
2121
},
2222
"autoload": {
2323
"classmap": [

src/Mcamara/LaravelLocalization/LaravelLocalization.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function getLocalizedURL( $locale = null, $url = null, $attributes = arra
238238
$url = $this->request->fullUrl();
239239

240240
}
241-
241+
242242
if ( $locale && $translatedRoute = $this->findTranslatedRouteByUrl($url, $attributes, $this->currentLocale) )
243243
{
244244
return $this->getURLFromRouteNameTranslated($locale, $translatedRoute, $attributes);
@@ -499,7 +499,7 @@ public function getCurrentLocale()
499499
*/
500500
public function getCurrentLocaleRegional()
501501
{
502-
// need to check if it exists, since 'regional' has been added
502+
// need to check if it exists, since 'regional' has been added
503503
// after version 1.0.11 and existing users will not have it
504504
if(isset($this->supportedLocales[ $this->getCurrentLocale() ][ 'regional' ]) )
505505
return $this->supportedLocales[ $this->getCurrentLocale() ][ 'regional' ];
@@ -604,7 +604,7 @@ public function getRouteNameFromAPath( $path )
604604
{
605605
$attributes = $this->extractAttributes($path);
606606

607-
$path = str_replace(url(), "", $path);
607+
$path = str_replace(url('/'), "", $path);
608608
if ( $path[ 0 ] !== '/' )
609609
{
610610
$path = '/' . $path;

0 commit comments

Comments
 (0)