AnsweredAssumed Answered

Plugin i18Text not getting rendered.

Question asked by shipra on Jun 22, 2015
Latest reply on Jul 1, 2015 by shipra

Hello,

 

I am creating a widget in which I need to make it multilingual.

I have placed the key value pair in plugin_i18n.properties file.

 

Path:src/main/resources

Value put in the file:

custom.defaultMessage=Enter The Location

 

I want to access this key from a js file which is in widget:

 

var defaultMessage = {i18nText('custom.defaultMessage')};

I am getting following error:

 

"Uncaught SyntaxError: Unexpected string"

 

I tried to display the key value from FTL:

<span>{i18nText('custom.defaultMessage')}</span>

 

output:{i18nText('custom.defaultMessage')}

 

Can anyone let me know whats going wrong???

 

I have done the same things in theme before.

Used custom key.JIVE key but never faced any issue there.

 

Ryan Rutan nilsheuer

Outcomes