cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Can localization be used in a Mashup Expression?

Timo697
12-Amethyst

Can localization be used in a Mashup Expression?

I often use the Expression function in mashups to display a modified version of a property of a Thing. 

For instance:

 

output = DeviceName + " Description";  //DeviceName is a String Parameter

 

 

I am trying to add localization to my mashups and would like to be able to use a token for the " Description" text.  How can I do this?.

2 REPLIES 2
abjain
13-Aquamarine
(To:Timo697)

@Timo697 You can try defining a session parameter with a default value as 'Description' and then that variable will be accessible in the mashups in the Session tab where you can bind it to your expression's input parameter.

Timo697
12-Amethyst
(To:abjain)

What would I set the Base Type as?

 

I set it to String then wrote a localization token into the Default Value:    [[Test_Description]]

 

My code in the expression is now:

output = Device + " " + Description;

 

Now, the expression has an output of:    Device [[Test_Description]]

Top Tags