Ich habe ein Problem mit dem Übersetzen von texten.
Und zwar will er mir einfach nicht die Datei /messages/de/my.php
<?php
array(
"This is just a test" => "Das ist nur ein Test",
"Hello username" => "Hallo username"
);
?>
So hir mal meine Datein
/config/translate.php
<?php
return array(
'sourcePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..', //root dir of all source
'messagePath' => '/protected/messages', //root dir of message translations
'languages' => array('de', 'en'), //array of lang codes to translate to, e.g. es_mx
'fileTypes' => array('php','js',), //array of extensions no dot all others excluded
'exclude' => array('.svn',), //list of paths or files to exclude
'translator' => 'Yii::t', //this is the default but lets be complete
);
?>
in der /config/main.php habe ich die language => ‘de’ gesetzt.
so dann noch denn view /views/main/index.php
<?php
echo Yii::t('my','This is just a test');
?>