Signature | Laravel 5: String Translation Public API
The signature of the addNamespace method is: 1 public function addNamespace ( 2 $ namespace , 3 $ hint 4 ) ; The parameters of this method match the parameters of the loader's addNamespace method.
Showing 10 of 1,280 results.
The signature of the addNamespace method is: 1 public function addNamespace ( 2 $ namespace , 3 $ hint 4 ) ; The parameters of this method match the parameters of the loader's addNamespace method.
The addJsonPath is used to add a new JSON language file path to the file loader. This method will internally call the addJsonPath on the translator's addJsonPath method. For more examples on how to call the addJsonPath method, refer to the...
The signature of the addJsonPath method is: 1 public function addJsonPath ( 2 $ path // The file path of the JSON language file. 3 ) ;
The addLines method can be used to add arbitrary translation lines to the translator's translation lines collection for the provided locale. This method can be used to add translation lines at runtime in response to dynamic conditions within your...
The signature for the addLines method is: 1 public function addLines ( 2 array $ lines , 3 $ locale , 4 $ namespace = ' * ' 5 ) ;
The following example demonstrates how to use the addLines method to add lines to the existing translator instance. We need to supply it a locale, but we will explore methods to do this dynamically based on the currently configured default locale....
The parseKey is used to parse a given $key into its namespace, group and item parts. The namespace refers to a custom namespace (or the default * namespace); the group refers to a particular file, such as passwords.php and the item refers to a...
The signature of the parseKey method is: 1 public function parseKey ( 2 $ key 3 ) ;
The following example will demonstrate how to call the parseKey method to return information about the translation key: 1 $ parts = $ translator -> parseKey ( ' passwords.reset ' ) ; After the above code has executed, the $parts array would...
Each translator instance contains an instance of Illuminate\Translation\MessageSelector , which is used to determine which translation line should be returned when using the choice or transChoice methods. The translator allows you to retrieve the...