On Sat, 2003-11-01 at 11:52, [EMAIL PROTECTED] wrote:
> On Sat, 1 Nov 2003, Joerg Heinicke wrote:
>
> > On 01.11.2003 12:32, [EMAIL PROTECTED] wrote:
> >
> > > hi people
> > >
> > > i use locale action to select the dir where my content files are
> > > i give the visitor the ability to select the locale
> > > (?locale=el or ?locale=en) but the first time u visit the site the locale
> > > is selected automatically.
> > >
> > > the problem is that when i use IE, localeAction set locale as "en" or
> > > "el" or ...
> > > but using mozilla localeAction set locale as "en_US" instead "en"
> > > is this a cocoon problem or not
> >
> > In mozilla you can play around with the preferences, i.e. you can set
> > the value for the locale. So it's either possible to use en_US or en.
> >
> > > i use locale content to create the path where the files are /xml/c_en (and
> > > not /xml_/c_en_US)
> >
> > Don't you use i18n transformer? It handles exactly this: It tries to
> > select en_US first, en afterwards.
> >
> > Joerg
> >
>
> i use i18n transformer to translate my .xml but to select the path i use
> just {locale} in sitemap
>
> ..
> <map:generate src="c_{../locale}/{1}.xml"/>
> ..
>
> so when the browser is mozilla the generator try to find the .xml in
> c_en_US/filename.xml
>
> but this path dont exist !!! (c_en/filename.xml)
>
> is something i missed?
>
> --stavros
>
This is how I do it:
(in Cocoon 2.1.2, you don't say what you're using)
<map:match pattern="**.xml">
<map:act type="locale">
<map:act type="resource-exists">
<map:parameter name="url" value="{../1}_{lang}.xml"/>
<map:generate src="documents/{../../1}_{../lang}.xml"/>
<map:serialize type="xml"/>
</map:act>
</map:act>
<map:generate src="{1}_en.xml"/>
<map:serialize type="xml"/>
</map:match>
The locale Action provides the {lang} derived from the full locale that
the browser send.
Regards,
Sim
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]