Reputation: 1901
In html, I can get a value localized by below code:
{{Lang::get('frontend/error_message.EMAIL_BLANK')}}
I want to use javascript
to check valid input data, and get value from localized, but it not working with below code:
error = <?php echo \Lang::get('frontend/error_message.EMAIL_BLANK');?>
error = <?php echo Lang::get('frontend/error_message.EMAIL_BLANK');?>
error = {{Lang::get('frontend/error_message.EMAIL_BLANK')}}
Upvotes: 1
Views: 93
Reputation: 5513
You probably just need to put in some "
error = "<?php echo \Lang::get('frontend/error_message.EMAIL_BLANK');?>"
error = "<?php echo Lang::get('frontend/error_message.EMAIL_BLANK');?>"
error = "{{Lang::get('frontend/error_message.EMAIL_BLANK')}}"
Upvotes: 2