2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\i18n\Tests\i18nTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\i18n\i18nEntityProvider;
|
|
|
|
|
2017-01-18 04:58:48 +01:00
|
|
|
class TestObject implements TestOnly, i18nEntityProvider
|
2016-10-14 03:30:05 +02:00
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
static $my_translatable_property = "Untranslated";
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public static function my_translatable_property()
|
|
|
|
{
|
2017-04-27 06:54:42 +02:00
|
|
|
return _t(__CLASS__.".my_translatable_property", self::$my_translatable_property);
|
2016-12-16 05:34:21 +01:00
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function provideI18nEntities()
|
|
|
|
{
|
2017-01-18 04:58:48 +01:00
|
|
|
return [
|
2017-04-27 06:54:42 +02:00
|
|
|
__CLASS__.".my_translatable_property" => self::$my_translatable_property,
|
2017-01-18 04:58:48 +01:00
|
|
|
];
|
2016-12-16 05:34:21 +01:00
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|