function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LouisTLouisT 

custom labels in helper.js list

Hi all,

I am trying to make an aura component that I can use in flow screens that display a list of countries. 
So far my code looks like this:
controller:

init: function(cmp, event, helper) {
        cmp.set("v.countryOptions", helper.getCountryOptions());
helper:
countryOptions: [
{'label': 'Afghanistan', value: 'AF'},
{'label': 'Aland Islands', value: 'AX'},
{'label': 'Albania', value: 'AL'},
{'label': 'Algeria', value: 'DZ'},
{'label': 'Andorra', value: 'AD'},
{'label': 'Angola', value: 'AO'},
{'label': 'Anguilla', value: 'AI'},
.... ]

Now, in the countryOptions list I would like to use custom labels for the label, like this:

{'label':  {!$Label.c.england}, value: 'EN'},

However this does not work. Only values inbetween '' are accepted and when I use '{!$Label.c.UPE_grues}' I just get the literal value.

Is there anyway to use custom labels here?

Many thanks,