class
Illuminate
/
Translation
/
PotentiallyTranslatedString
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
PotentiallyTranslatedString
Implements
- Stringable
Properties
protected
$string
string
The string that may be translated.
Default: null
protected
$translation
string null
The translated string.
Default: null
Methods
public
__construct ( $string , $translator ) : void
Create a new potentially translated string.
Parameters
- $string string
- $translator Translator
public
translate ( $replace , $locale ) : $this
Translate the string.
Parameters
- $replace array
- $locale string|null
public
translateChoice ( $number , array $replace , $locale ) : $this
Translates the string based on a count.
Parameters
- $number Countable |int|array
- $replace array
- $locale string|null
public
original ( ) : string
Get the original string.
public
__toString ( ) : string
Get the potentially translated string.
public
toString ( ) : string
Get the potentially translated string.