Concrete5.7 package translation does't work

I'm trying to translate my package going by the steps in this Howto:

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 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: I've renamed my messages files to ru_RU.po and 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.

View Replies:
mlocati replied on at Permalink Reply
This is neither a concrete5 error nor a translation error, it's a PHP error: you can't call functions when defining class properties.

The correct way to initialize class properties is this:
linuxoid replied on at Permalink Reply
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