Skip to content

Use JsTrans with yiic message #12

@nordkite

Description

@nordkite

Can you please point me to the right direction? I have a Yii project and translation is generated using yiic. I am able to generate string with Yii.t translator.
In JS files I have alert(Yii.t("translate","Your message has been sent successfully"));

I installed your extension this way
Yii::setPathOfAlias('extensions', dirname(FILE).'/../../../extensions');

'import'=>array(
'application.models.',
'application.components.
',
'extensions.JsTrans.*',
),

'jsTrans'=>array(
'class'=>'extensions.JsTrans.JsTrans',
'languages'=>array('en','es'), // the languages to be made available
),

So the confusing part for me is this line in the README file
new JsTrans('app','nl');

Where do I need to put this line of code to work correctly with yiic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions