interface Illuminate / Contracts / Translation / Translator
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

Translator

Methods

public

get ( $key , array $replace , $locale ) : mixed

Get the translation for a given key.

Parameters

  • $key string
  • $replace array
  • $locale string|null
public

choice ( $key , $number , array $replace , $locale ) : string

Get a translation according to an integer value.

Parameters

  • $key string
  • $number Countable |int|array
  • $replace array
  • $locale string|null
public

getLocale ( ) : string

Get the default locale being used.

public

setLocale ( $locale ) : void

Set the default locale.

Parameters

  • $locale string