Hi Lutz, The locale used in the MessagesWrapper class - specific to our FreeMarker implementation details - is passed on by whatever components uses FreemarkerHelper. When rendering pages, we're talking about FreemarkerTemplateRenderer or FreemarkerParagraphRenderer, which both get it from the AggregationState instance used for the current request, and that was set by I18nContentSupportFilter, using the configured I18nContentSupport.
So in your case, it should be a matter of simply defining the defaultLocale (or "fallbackLocale") in configuration:/server/i18n/content. Out of curiosity though, if you have a single language file, I wonder why you'd even need to specify the locale at all. HTH, -greg On 30 Dec 2010, at 13:47, Lutz Hühnken wrote: > > Hi all, > > I am trying to use the "system internationalization" in a websites > Freemarker templates. > > I.e. not internationalized content, but localized strings from some > .properties file, as you would use for AdminCentral dialogs. See > http://documentation.magnolia-cms.com/technical-guide/i18n.html, the > first section "System". > > There it says: > >> Similarly, you define an i18nBasename in the template or paragraph >> definition. You would then use a key in the template script. >> Freemarker: >> ${i18n['link.readon']} > > I would like to use this in Freemarker Templates, and I would like to > define the locale as a page property. But apart from that, no i18n is > desired, or more specifically: content i18n support is not activated. > > It seems the i18n object (type > info.magnolia.freemarker.MessagesWrapper) does not allow me to pass > the desired locale directly as a parameter. It seems to get the locale > from the MgnlContext, but I can't figure out where it is set. > > Does someone know how I can specify the locale used by the MessagesWrapper? > > Thanks, > > Lutz > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
