File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Despark/LaravelDbLocalization Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function getLocaleField()
40
40
*/
41
41
public function getTranslatorField ()
42
42
{
43
- return $ this ->translatedAttributes ;
43
+ return $ this ->translatorField ;
44
44
}
45
45
46
46
/**
@@ -51,7 +51,7 @@ public function getTranslatorField()
51
51
*/
52
52
public function getTranslatedAttributes ()
53
53
{
54
- return $ this ->translatorField ;
54
+ return $ this ->translatedAttributes ;
55
55
}
56
56
57
57
/**
@@ -79,7 +79,7 @@ public function getI18nId($locale = null)
79
79
*
80
80
* @param null $locale
81
81
*/
82
- public function translate ($ locale = null )
82
+ public function translate ($ locale = false )
83
83
{
84
84
$ translationModel = new $ this ->translator ();
85
85
@@ -89,7 +89,7 @@ public function translate($locale = null)
89
89
90
90
$ translation = null ;
91
91
92
- if (isset ($ this ->id )) {
92
+ if (isset ($ this ->id ) && ! $ locale ) {
93
93
$ translation = $ translationModel ::where ($ this ->translatorField , $ this ->id )
94
94
->where ($ this ->localeField , $ locale )->first ();
95
95
}
You can’t perform that action at this time.
0 commit comments