Skip to content

Commit

Permalink
Also updating the new __x() function
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jul 26, 2014
1 parent 447ca25 commit 3eb4345
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/basics.php
Expand Up @@ -703,9 +703,8 @@ function __x($context, $singular, $args = null) {
return;
}

$translated = I18n::translate($singular, null, null, null, null, null, $context);
$arguments = func_get_args();
return I18n::insertArgs($translated, array_slice($arguments, 1));
$arguments = func_num_args() === 2 ? (array)$args : array_slice(func_get_args(), 1);
return I18n::translator()->translate($singular, $arguments);
}

}
Expand Down

0 comments on commit 3eb4345

Please sign in to comment.