mirror of
https://github.com/nextcloud/server.git
synced 2024-12-29 16:38:28 +00:00
afa48a4e0e
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
29 lines
684 B
PHP
29 lines
684 B
PHP
<?php
|
|
/**
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Testing\Provider;
|
|
|
|
use OCP\Translation\ITranslationProvider;
|
|
use OCP\Translation\LanguageTuple;
|
|
|
|
class FakeTranslationProvider implements ITranslationProvider {
|
|
|
|
public function getName(): string {
|
|
return 'Fake translation';
|
|
}
|
|
|
|
public function getAvailableLanguages(): array {
|
|
return [
|
|
new LanguageTuple('de', 'German', 'en', 'English'),
|
|
new LanguageTuple('en', 'English', 'de', 'German'),
|
|
];
|
|
}
|
|
|
|
public function translate(?string $fromLanguage, string $toLanguage, string $text): string {
|
|
return strrev($text);
|
|
}
|
|
}
|