1

The code bellow should return plural.

use Drupal\Core\StringTranslation\PluralTranslatableMarkup;

$trans = new PluralTranslatableMarkup(12, 'singular', 'plural');
$output = '' . $trans;
$output1 = $trans->render();

Both $output and $output1 returns singular;

Any clues why? Thank you.

5
  • Did you try with other numbers? What is the language set for the site?
    – apaderno
    Jun 6, 2019 at 15:44
  • 1
    yes, however it seems like this is core bug drupal.org/node/2660338
    – zanvidmar
    Jun 7, 2019 at 11:22
  • 2
    I'm voting to close this question as off-topic because it's a known bug tracked on drupal.org.
    – leymannx
    Aug 15, 2019 at 17:00
  • @leymannx I do agreee, but I still do not know what should I pick when flagging this question ( Flagging>Closing>Off-Topic ). I guess it is nor ok to delete the question doe? :)
    – zanvidmar
    Aug 15, 2019 at 17:12
  • There's this one flagging option where you can enter a text yourself. Regarding deleting the question altogether I'd prefer leaving it here to help others to find the issue on drupal.org more easily. :)
    – leymannx
    Aug 15, 2019 at 17:21

0

Browse other questions tagged or ask your own question.