I have the following phrase and want to translate it.
$lifeTime = 'Expires in '.$days.($days == 1 ? ' day ':' days ' ).$h.(($h == 1 ? ' hour ':' hours ' ));
My question is: will I need to split the phrase, translate separated and concatenate them ? Is there a way to __n()
function accept multiple "instances" of singular/plural with their respective counts on a single phrase ?
A bit confusing. A example to make it clear:
__('I have %s eggs and %s milk boxes', $eggs, $milk)
This will not have singular and plural form. Can I make it translate the entire phrase without having to split it in two __n()
function calls ?