NullTranslator.php 518 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Elgg\I18n;
  3. /**
  4. * WARNING: API IN FLUX. DO NOT USE DIRECTLY.
  5. *
  6. * A translator that does nothing except return the key that was requested.
  7. *
  8. * This translator is useful during development if you want to be able to
  9. * easily tell what the available keys are for changing the wording of UI elements.
  10. *
  11. * @since 1.10.0
  12. *
  13. * @access private
  14. */
  15. final class NullTranslator extends Translator {
  16. /** @inheritDoc */
  17. public function translate($key, $args = array(), $lang = '') {
  18. return $key;
  19. }
  20. }