rmariuzzo/Lang.js

translation attributes

Opened this issue · 1 comments

Is there a way to use the 'attribues' array, which is defined in a translation file. E.g. 'email' => 'Email address'. or will I simply have to do something like Lang.get('validation.email', {attribute: Lang.get('validation.attributes.email')})?

I just tried it and you can do Lang.get('validation.email', {name: 'Bob'})
If validation.email = "Hello :name" it will print "Hello Bob"