File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ public function lateCollect()
45
45
$ this ->data = $ this ->computeCount ($ messages );
46
46
$ this ->data ['messages ' ] = $ messages ;
47
47
48
+ $ this ->data ['locale ' ] = $ this ->translator ->getLocale ();
49
+ $ this ->data ['fallback_locales ' ] = $ this ->translator ->getFallbackLocales ();
50
+
48
51
$ this ->data = $ this ->cloneVar ($ this ->data );
49
52
}
50
53
@@ -87,6 +90,16 @@ public function getCountDefines()
87
90
return isset ($ this ->data [DataCollectorTranslator::MESSAGE_DEFINED ]) ? $ this ->data [DataCollectorTranslator::MESSAGE_DEFINED ] : 0 ;
88
91
}
89
92
93
+ public function getLocale ()
94
+ {
95
+ return !empty ($ this ->data ['locale ' ]) ? $ this ->data ['locale ' ] : null ;
96
+ }
97
+
98
+ public function getFallbackLocales ()
99
+ {
100
+ return (isset ($ this ->data ['fallback_locales ' ]) && count ($ this ->data ['fallback_locales ' ]) > 0 ) ? $ this ->data ['fallback_locales ' ] : array ();
101
+ }
102
+
90
103
/**
91
104
* {@inheritdoc}
92
105
*/
You can’t perform that action at this time.
0 commit comments