Showing 7 of 1,697 result(s)
The setLocale method can be used to set the translator's default locale.
In the following example, we will change the translator's default locale to es :
The locale method is an alias of the getLocale and share the same signatures and behavior. They can be used interchangeably.
In the following example, we will use the setFallback method to change the current fallback locale to it :
The signature of the set method is:
Given the following array: We can reassign the arrays like so: The value of $testArray would now be:
The array_set function is a shortcut to calling Arr::set . This function is declared in the global namespace.