Translation in javascript
Permalink 1 user found helpful
Which is the best way to work with internationalization in javascript ? in PHP we work with t('sample') but in javascript ?
@mnakalay
Thank you, I've wondered how to do this.
Thank you, I've wondered how to do this.
Still I'd love to know how to do it outside of blocks. I have a package with a js file loading on every page through the package's controller. I couldn't figure out how to deal with strings in that js file so I didn't make them translatable
[EDIT]
My understanding is that is only usable in block's controllers and you have to define the strings in the controller.
Read this to have all the details:http://www.concrete5.org/documentation/recorded-trainings/advanced-...