ITranslationProvider.php 625 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Translation;
  8. use RuntimeException;
  9. /**
  10. * @since 26.0.0
  11. * @deprecated 30.0.0
  12. */
  13. interface ITranslationProvider {
  14. /**
  15. * @since 26.0.0
  16. */
  17. public function getName(): string;
  18. /**
  19. * @since 26.0.0
  20. */
  21. public function getAvailableLanguages(): array;
  22. /**
  23. * @since 26.0.0
  24. * @throws RuntimeException If the text could not be translated
  25. */
  26. public function translate(?string $fromLanguage, string $toLanguage, string $text): string;
  27. }