0
0
mirror of https://github.com/nextcloud/server.git synced 2024-12-29 16:38:28 +00:00
nextcloud_server/apps/testing/lib/Provider/FakeTranslationProvider.php
Andy Scherzinger afa48a4e0e
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-02 20:00:00 +02:00

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);
}
}