Showing 7 of 1,216 result(s)
The setLocale method can be used to set the translator's default locale.
The signature of the setLocale method is:
In the following example, we will change the translator's default locale to es :
The getLocale method is used to determine what the currently configured default locale is.
The signature of the getLocale method is: public function getLocale();
For the following example, we will see how the results of calling the getLocale method change after we manipulate the currently configured default locale: After the above code has executed, the locale variables would contain the following values:...
The locale method is an alias of the getLocale and share the same signatures and behavior. They can be used interchangeably.