Übersetzen

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


?>



ich erkenn da was wieder, hehe

spiel mal in der config mit dem Parameter ‘sourceLanguage’ => ‘de_de’ herum, oder source ist ja in diesem fall englisch, schau dir ua auch die kommentare im Guide an

OKay danke habe es nun gelöst.