On Thu, 2009-04-02 at 08:36 +0200, [email protected] wrote:
> Hello!
>
> I inserted ${mgnl.locale} in my jsp page but there is nothing outputted.
> Do I have to import anything to my jsp page, to make ${mgnl.locale} work?
> I'm using magnolia 3.6.1
${ctx.locale}, sorry
> Lots of thanks!
>
>
> -------- Original-Nachricht --------
> > Datum: Wed, 01 Apr 2009 22:14:03 +0200
> > Von: Jan Haderka <[email protected]>
> > An: Magnolia User-List <[email protected]>
> > Betreff: Re: [magnolia-user] How to build links with language information
>
> >
> > On Wed, 2009-04-01 at 21:43 +0200, [email protected] wrote:
> > > Thanks for your fast Reply!
> > >
> > > Does this mean that I have to implement the getLangaugePostfix() Method?
> > There is no Built-In way (e.g. a tag) to get this information from
> > Magnolia?
> >
> > That depends on what you want to do. If all you are looking for is to
> > get current user locale, use:
> > MgnlContext.getLocale() or as Gregory mentioned ${mgnl.locale}
> > in jsp syntax.
> >
> >
> > And (unrelated to the above) you can create locale aware link using:
> > LinkUtil.createAbsoluteLink(imageNodeDataOrContent)
> >
> > ... this is using AbsolutePathTransformer initialized to be locale
> > aware. Mind that this syntax is valid for Magnolia 4.0+ ... it have been
> > bit different in prior versions.
> >
> > HTH,
> > Jan
> >
> > >
> > > Best Regards
> > > Stefan
> > > -------- Original-Nachricht --------
> > > > Datum: Wed, 1 Apr 2009 19:27:08 +0200
> > > > Von: "Grégory Joseph" <[email protected]>
> > > > An: "Magnolia User-List" <[email protected]>
> > > > Betreff: Re: [magnolia-user] How to build links with language
> > information
> > >
> > > >
> > > > You might want to have a look at I18ContentSupport.
> > > > The tags or ${mgnl....} should take care of this for you.
> > > >
> > > > -g
> > > >
> > > > On Apr 1, 2009, at 11:40 AM, Stefan Hildebrand wrote:
> > > >
> > > > >
> > > > > Hello!
> > > > >
> > > > > Doesn't anyone know how I can get the the information in which
> > > > > language the user is watching the site? I think this should be an
> > > > > attribute of the request/page context?
> > > > >
> > > > > Or is there another way to create these links?
> > > > >
> > > > > Thanks for your help!
> > > > >
> > > > > Stefan
> > > > >
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > >> Datum: Thu, 26 Mar 2009 10:13:48 +0100
> > > > >> Von: [email protected]
> > > > >> An: "Magnolia User-List" <[email protected]>
> > > > >> Betreff: [magnolia-user] How to build links with language
> > > > >> information
> > > > >
> > > > >>
> > > > >> Hello!
> > > > >>
> > > > >> I am using the i18n functionality and now want to create links in
> > > > >> my jsp
> > > > >> pages.
> > > > >>
> > > > >> I create the links in this way:
> > > > >> ${pageContext.request.contextPath}${imagedata.imageLink}.html
> > > > >> In this case I loose the information in which language the page is
> > > > >> shown.
> > > > >>
> > > > >> I get a link like
> > http://localhost:8080/magnoliaAuthor/target-site.html
> > > > >> but I want to have a link like
> > > > >>
> > > > >> http://localhost:8080/magnoliaAuthor/en/target-site.html
> > > > >>
> > > > >> What is the way to get the language information? I think there is a
> >
> > > > >> way
> > > > >> like ${pageContext.request.languagekey} or something similar.....
> > > > >>
> > > > >> Hope someone can help me.
> > > > >>
> > > > >> Thanks for your help in advance!
> > > > >>
> > > > >> Stefan
> > > > >> --
> > > > >> Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate +
> > > > >> Telefonanschluss für nur 17,95 Euro/mtl.!*
> > > > http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
> > > > >>
> > > > >> ----------------------------------------------------------------
> > > > >> For list details see
> > > > >> http://www.magnolia-cms.com/home/community/mailing-lists.html
> > > > >> To unsubscribe, E-mail to: <[email protected]>
> > > > >> ----------------------------------------------------------------
> > > > >
> > > > > --
> > > > > Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit
> > > > > allen: http://www.gmx.net/de/go/multimessenger01
> > > > >
> > > > > ----------------------------------------------------------------
> > > > > 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]>
> > > > ----------------------------------------------------------------
> > >
> > --
> > Best regards,
> >
> > Jan Haderka
> > Magnolia International Ltd.
> >
> > ----------------------------------------------------------------------
> > [email protected] http://www.magnolia-cms.com
> > Magnolia® - Simple Open Source Content Management
> > ----------------------------------------------------------------------
> >
> >
> > ----------------------------------------------------------------
> > For list details see
> > http://www.magnolia-cms.com/home/community/mailing-lists.html
> > To unsubscribe, E-mail to: <[email protected]>
> > ----------------------------------------------------------------
>
--
Best regards,
Jan Haderka
Magnolia International Ltd.
----------------------------------------------------------------------
[email protected] http://www.magnolia-cms.com
Magnolia® - Simple Open Source Content Management
----------------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------