- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 02:27 AM
Hi all,
I have this jelly script in a UI page (HTML part)
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button id="add_attachment" type="button" onclick="saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item')">Add Attachment</button>
</j:jelly>
The part in "RED" is not translated. The button is labelled "Add attachment in all language.
I want to get it translated and I have a message called add_attachment.
What is the syntax to use getMessage in this case to call my message which will set the value of the button?
Thanks in advance for your help.
Regs,
Lô Mouhamadou
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 03:53 AM
Here you go
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button id="add_attachment" type="button" onclick="saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item')">${gs.getMessage(
'Add Attachment')}</button>
</j:jelly>
***Add the appropriate entries to System UI> Messages with the key "Add Attachment" (if they do not already exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 02:33 AM
Check if below helps you:-
Sample code using getMessage:-
<j:if test="${jvar_oi_order_now_button_override == 'true'}">
<g:evaluate jelly="true" expression="var sc_order_now_label=gs.getMessage(jelly.jvar_sc_order_now_label);" />
<g:sc_button classes="request_catalog_button_with_icon" img="images/button_cursor.gifx" id="oi_order_now_button" onclick="if ($$('.order_buttons .disabled_order_button').length == 0) { orderItemWidget.orderNow(); } else { alert('${gs.getMessage('Please wait - price being updated')}'); }" label="${sc_order_now_label}" title="${sc_order_now_label}" isPrimary="true"/>
</j:if>
Second Parameter of getMessage() on Client Side
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
Thanks,
Deepa

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 03:53 AM
Here you go
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button id="add_attachment" type="button" onclick="saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item')">${gs.getMessage(
'Add Attachment')}</button>
</j:jelly>
***Add the appropriate entries to System UI> Messages with the key "Add Attachment" (if they do not already exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 05:19 AM
Hi Chuck,
Thanks. it works fine.
a small question still for more or less the same issue.
How does it work for this button, please?
Still In Jelly/html part
<input type='button' value='Download PDF' onClick='downloadPDF()'/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 06:14 AM
this one works fine to. however pdf is generated but not attached in the Record producer then to the case