Is there a way to use texts based on the user language when creating buttons in macros

For example when using the create-from-template macro, can I enter the value of the 'Button text' parameter based on the current users UI language?

Or asking another way:

How can I localize the 'Button text' parameter for the create-from-template macro so that the user will see the buttons' text in his language when visiting the corresponding page?

1 answer

This widget could not be displayed.

Hi Rainer,

yes, there are a couple of ways to do this. The Tutorial on internationalisation is a good point to start. It is also possible to use this for JavaScript (AJS.I18n.getText(...)) or soy templates (add transformer to web resources).

Best regards,
Robert 

Hi Robert,

thanks for your answer. Since the macro in question is a built-in macro, I doubt I can change its implementation in regard to internationalization. I was looking more for a method like that which is documented for the 'template name' parameter. To refer to the current date there one use the at notation: @currentDate.

I guess what I am looking for is a way to access a text already defined in the confluence language pack. I would assume a language pack contains a text for 'Create' or 'Create page' which has already been translated. If there were a handle for such texts then I could refer to them when filling out macro parameters.

Example @i18n:createPage.

Best regards

Rainer

In that case you can create a translation pack. To find out which keys to translate you can add "?i18ntranslate=on" to the end of the url. This should show you the i18n keys, instead of the localized labels.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

149 views 12 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you