Forums

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

Load properties file from third party plugin

Tuelle
Contributor
April 29, 2018

Hi,

I want to use translation files (*.properties) from another plugin in my plugin. Specifically, I want use the translations in my javascript code. Can anybody tell me if and what I have to add to my atlassian-plugin.xml and .js files to get access to the key value pairs?

Thanks

Tuelle

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2018

There is nothing special to add. You can reference properties like this

$i18n.getText("property.key")

Tuelle
Contributor
April 30, 2018

Hi Alexey,

This is what I also thought. But the function just returns the key. Please note that I don't want to access a property in my plugin but in another one.

Thanks

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2018

Ah, I see. You can not read properties from another plugin in a good supportable way.

Suggest an answer

Log in or Sign up to answer