<script src="translate.js"></script>
var messages = {
en_US = {
success: {
comment: {
add: 'Your comment has been added successfully',
remove: 'Your comment has been removed',
edit: 'Your comment has been updated'
},
feedback: {
send: 'Your feedback successfully send to administrator',
receive: 'New response for your feedback has been received'
}
}
}
};
var settings = {
lang: 'en_US'
};
With default language:
var translated = tr('success:comment:add');
With custom language:
var translated = tr('success:comment:edit', 'ru_RU');