AJS.I18n.getText - "Change password" with Javascript


we connected Confluence to some external SAML IDP with an addon.
Now I want to add a “Change Password” button next to the “Edit Profile” button, where the user is forwarded to the IDP change password page. For this, I will display the label of the button in the user selected language setting. I will do this in javascript to not change any templates.

I tried to find the plugin of the “change.password” string, so I can load it with the AJS.I18n.getText() Javascript snipplet.

I just found it in the language (for example: tac.confluence.languages.de_DE) plugins, but I cant load them through a 500 Server error.
And asking for the language pack will result in the question “how to get the current users language pack”.

Maybe my intention is basically wrong:
How can I get the “change password” phrase in the current user language settings with javascript?


This is a copy of https://community.atlassian.com/t5/Confluence-questions/AJS-I18n-getText-quot-Change-password-quot-with-Javascript/qaq-p/1397327. But I think you can answer this question more likely.

Hello Robin,

You may try our plugin Translate for Confluence to check if it is generally possible to translate this string.

If it is possible and you only want to translate this single string you can “just” create a basic plugin which only offers translation files for just this string (should work)

Basically Confluence should just try to set the users language automatically. But without seeing a the concrete application and methods used, it is hard to say, what the problem is.