translation.html.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. This template is used for translation message extraction tests
  2. <?php echo $view['translator']->trans('single-quoted key'); ?>
  3. <?php echo $view['translator']->trans('double-quoted key'); ?>
  4. <?php echo $view['translator']->trans(<<<EOF
  5. heredoc key
  6. EOF
  7. ); ?>
  8. <?php echo $view['translator']->trans(<<<'EOF'
  9. nowdoc key
  10. EOF
  11. ); ?>
  12. <?php echo $view['translator']->trans(
  13. "double-quoted key with whitespace and escaped \$\n\" sequences"
  14. ); ?>
  15. <?php echo $view['translator']->trans(
  16. 'single-quoted key with whitespace and nonescaped \$\n\' sequences'
  17. ); ?>
  18. <?php echo $view['translator']->trans(<<<EOF
  19. heredoc key with whitespace and escaped \$\n sequences
  20. EOF
  21. ); ?>
  22. <?php echo $view['translator']->trans(<<<'EOF'
  23. nowdoc key with whitespace and nonescaped \$\n sequences
  24. EOF
  25. ); ?>
  26. <?php echo $view['translator']->trans('single-quoted key with "quote mark at the end"'); ?>
  27. <?php echo $view['translator']->transChoice(
  28. '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
  29. 10,
  30. ['%count%' => 10]
  31. ); ?>
  32. <?php echo $view['translator']->trans('concatenated'.' message'.<<<EOF
  33. with heredoc
  34. EOF
  35. .<<<'EOF'
  36. and nowdoc
  37. EOF
  38. ); ?>
  39. <?php echo $view['translator']->trans('other-domain-test-no-params-short-array', [], 'not_messages'); ?>
  40. <?php echo $view['translator']->trans('other-domain-test-no-params-long-array', [], 'not_messages'); ?>
  41. <?php echo $view['translator']->trans('other-domain-test-params-short-array', ['foo' => 'bar'], 'not_messages'); ?>
  42. <?php echo $view['translator']->trans('other-domain-test-params-long-array', ['foo' => 'bar'], 'not_messages'); ?>
  43. <?php echo $view['translator']->transChoice('other-domain-test-trans-choice-short-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?>
  44. <?php echo $view['translator']->transChoice('other-domain-test-trans-choice-long-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?>
  45. <?php echo $view['translator']->trans('typecast', ['a' => (int) '123'], 'not_messages'); ?>
  46. <?php echo $view['translator']->transChoice('msg1', 10 + 1, [], 'not_messages'); ?>
  47. <?php echo $view['translator']->transChoice('msg2', ceil(4.5), [], 'not_messages'); ?>