Concrete5.7 package translation does't work

Permalink
I'm trying to translate my package going by the steps in this Howto:http://www.concrete5.org/documentation/how-tos/developers/translate...

But the very first string I need to translate gives me an error:

public $entry_name = t('Name:'); -> syntax error, unexpected '(', expecting ',' or ';'

Then, instead of declaring that variable, I simply wrote in the view.php file

echo $form->label('name', t('Your Name'), array ('class'=>"required"));

then gone through all the steps creating my messages.po and messages.mo files - it didn't work, the text doesn't get translated. The po and mo files are in my application/packages/MY_PACKAGE/languages/ru_RU/LS_MESSAGES folder.

I tried another HowTo:http://www.concrete5.org/documentation/how-tos/developers/translati... I've renamed my messages files to ru_RU.po and ru_RU.mo and moved them to application/languages/site - still doesn't work, I only see English.

Then I've uninstalled my package, installed it again. I go the an English page - ok. Then go to a Russian page and get this error:

Zend \ I18n \ Exception \ RuntimeException
Plural rule of merging text domain is not compatible with the current one

What's wrong? I'm totally clueless now what to do. Could anyone help please?

Thank you.

linuxoid
 
mlocati replied on at Permalink Reply
mlocati
This is neither a concrete5 error nor a translation error, it's a PHP error: you can't call functions when defining class properties.
Seehttp://3v4l.org/76hNR

The correct way to initialize class properties is this:http://3v4l.org/1f7rN
linuxoid replied on at Permalink Reply
linuxoid
Thank you for that. Of course. How couldn't I thought of that before?

But do you know why my text doesn't get translated even though I use the string directly in the form?
linuxoid replied on at Permalink Reply
linuxoid
Anyone?