Search

Showing 7 of 1,216 result(s)

/blog/2016/11/30/the-laravel-translator#content-parsekeykey

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...

/blog/2016/11/30/the-laravel-translator#content-setselectormessageselector-selector

The setSelector method sets a Symfony\Component\Translation\MessageSelector instance ( $selector ) for the Translator . The MessageSelector instance is used by the choice and transChoice methods for loading the correct translation message based on...

/blog/2016/11/30/the-laravel-translator#content-getselector

The getSelector() method returns the instance of \Symfony\Component\Translation\MessageSelector that the translator is currently using. If no MessageSelector has been previously set, a new instance of MessageSelector is created and returned.

/blog/2016/11/30/the-laravel-translator#content-getloader

The getLoader method is used to return the instance of the Illuminate\Translation\LoaderInterface implementation the translator is currently using. By default, this will be an instance of Illuminate\Translation\FileLoader , which is registered...

/blog/2016/11/30/the-laravel-translator#content-getlocale

The getLocale method is used to retrieve the current locale being used by the translator. The method is required by Symfony's TranslatorInterface .

/blog/2016/11/30/the-laravel-translator#content-locale

The locale() method is functionally identical to the getLocale() method. It internally returns the value of the getLocale() method.

/blog/2016/11/30/the-laravel-translator#content-setlocalelocale

The setLocale method is used to set the locale that the translator should use. It accepts only one parameter $locale , which is the locale that should be set. By default, it is set to the value defined for locale in the app.php configuration file.