PluginProbe
Auto Alt Text / 3.0.3
Auto Alt Text v3.0.3
3.0.3 2.8.2 1.3.1 1.3.2 2.0.0 2.1.0 2.1.1 2.2.0 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.7.0 2.8.0 2.8.1 All 28 releases
auto-alt-text / src / App / AIProviders / Contracts / SupportsTranslation.php

SupportsTranslation.php in Auto Alt Text 3.0.3, at src/App/AIProviders/Contracts/SupportsTranslation.php

36 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AATXT\App\AIProviders\Contracts;
4
5 /**
6 * Interface for AI providers that support text translation.
7 *
8 * Following the Interface Segregation Principle, this interface defines
9 * only the methods related to translation capabilities.
10 */
11 interface SupportsTranslation
12 {
13 /**
14 * Translate text to the specified target language.
15 *
16 * @param string $text The text to translate
17 * @param string $targetLanguage The target language code (e.g., 'it', 'es', 'fr')
18 * @return string The translated text
19 */
20 public function translate(string $text, string $targetLanguage): string;
21
22 /**
23 * Check if translation is enabled and configured.
24 *
25 * @return bool True if translation is available, false otherwise
26 */
27 public function isTranslationEnabled(): bool;
28
29 /**
30 * Get the configured target language for translation.
31 *
32 * @return string The language code, or empty string if not configured
33 */
34 public function getTargetLanguage(): string;
35 }
36