class
Illuminate
/
Translation
/
MessageSelector
MessageSelector
Methods
public
choose ( $line , $number , $locale ) : mixed
Select a proper translation string based on the given number.
Parameters
- $line string
- $number int
- $locale string
private
extract ( $segments , $number ) : mixed
Extract a translation string using inline conditions.
Parameters
- $segments array
- $number int
private
extractFromString ( $part , $number ) : mixed
Get the translation string if the condition matches.
Parameters
- $part string
- $number int
private
stripConditions ( $segments ) : array
Strip the inline conditions from each segment, just leaving the text.
Parameters
- $segments array
public
getPluralIndex ( $locale , $number ) : int
Get the index to use for pluralization.
Parameters
- $locale string
- $number int