TranslateInterface.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework;
  7. /**
  8. * @todo change this interface when i18n-related logic is moved to library
  9. */
  10. interface TranslateInterface
  11. {
  12. /**
  13. * Default translation string
  14. */
  15. const DEFAULT_STRING = 'Translate String';
  16. /**
  17. * Initialize translation data
  18. *
  19. * @param string|null $area
  20. * @param bool $forceReload
  21. * @return \Magento\Framework\TranslateInterface
  22. */
  23. public function loadData($area = null, $forceReload = false);
  24. /**
  25. * Retrieve translation data
  26. *
  27. * @return array
  28. */
  29. public function getData();
  30. /**
  31. * Retrieve locale
  32. *
  33. * @return string
  34. */
  35. public function getLocale();
  36. /**
  37. * Set locale
  38. *
  39. * @param string $locale
  40. * @return \Magento\Framework\TranslateInterface
  41. */
  42. public function setLocale($locale);
  43. /**
  44. * Retrieve theme code
  45. *
  46. * @return string
  47. */
  48. public function getTheme();
  49. }