silverstripe-framework/tests/php/i18n/i18nTest/TestObject.php

24 lines
585 B
PHP
Raw Permalink Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\i18n\Tests\i18nTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\i18n\i18nEntityProvider;
class TestObject implements TestOnly, i18nEntityProvider
2016-10-14 03:30:05 +02:00
{
static $my_translatable_property = "Untranslated";
2016-10-14 03:30:05 +02:00
public static function my_translatable_property()
{
2024-06-17 23:37:39 +02:00
return _t(__CLASS__ . ".my_translatable_property", TestObject::$my_translatable_property);
}
2016-10-14 03:30:05 +02:00
public function provideI18nEntities()
{
return [
2024-06-17 23:37:39 +02:00
__CLASS__ . ".my_translatable_property" => TestObject::$my_translatable_property,
];
}
2016-10-14 03:30:05 +02:00
}