It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Controlling Locale/Language for Space and Page Blueprints in Confluence

I'm trying to create a space/page with a space/page blueprint with a locale that differs from the site default. E.g. the site default it en, but I want to create a space with locale de. I have read some articles that discuss using different spaces for different locales, so I assume that there is a way to archive this.

I would like to set a locale for a space so that each application of a page blueprint will use the space's locale.

In my blueprints I use

<at:i18n at:key="mykey.desc"/>

to access the localized resources. It seems that the generation process uses the site default to determine the localization bundle:

i18NBeanFactory.getI18NBean(localeManager.getSiteDefaultLocale())

I also found no evidence that I can change this behaviour by setting a blueprint context parameter (e.g. com.atlassian.confluence.plugins.createcontent.api.contextproviders.BlueprintContextKeys).

Is my observation correct that Confluence selects the localization via the site default locale? If this is true, are there any workarounds to e.g. specify the locale via the wizard or taking the user's locale into account?

I suppose that setting the request language with com.atlassian.confluence.languages.LocaleManager does not offer any help? I gave it a try, but observed no effect. I have read the API doc, but I do not understand what these methods are designed for to do (i.e. who uses this information):

/**
     * Should set the language string from the request in a THREAD LOCAL cache.
     *
     * @param languageString
     */
    void setRequestLanguages(String languageString);

    /**
     * Should set the language string as given by Locale (en-gb for example) in a THREAD LOCAL cache.
     * Does nothing if the language string is invalid.
     *
     * @param language
     */
    void setLanguage(String language);

Has anybody managed to control the language/locale for creating spaces/pages with space/page blueprints independent of the site default locale?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

I'm also interested in that.

Community showcase
Published in Feedback & Announcements

Atlassian Authors Awards

We created the Atlassian Authors program in 2019 to give more Community members the permissions to write Articles, along with the inspiration and tools to help them succeed. Since then, the program...

157 views 8 10
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you