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?
Community moderators have prevented the ability to post new answers.
I'm also interested in that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.