[opencms-dev] Multilanguage pages
Carl Alex Friis Nielsen
cfn at kb.dk
Fri Nov 10 10:56:20 CET 2006
-----Original Message-----
From: opencms-dev-bounces at opencms.org@KB On Behalf Of Eneko González
Benito <eneko.gonzalez at elpagestion.com>
> But this way, i'd have one jsp file for each locale, wouldn't i?
That depends on what you want to do with the jsp.
If you want to display some content found in another resource you
could just use the same jsp.
If you want to write locale dependent stuff in the jsp you could
write a different jsp for each locale, but you would probably be
better of by doing some logic based on the locale property to do
different stuff for different locales and/or load locale dependant
strings from a resourcebundle depending on the locale.
> I think OpemCMS must support the same file having the content in several
> locales (i can see the localized-contents in "controlcode").
Off course it does - if you use the same template (a jsp) to display
sibling of the same resource in different locales you will see the
content of the proper locale displayed for each sibling. If the content
does not contain a version in some locale some default other locales content
will be displayed.
> Isn't this a better way to do it?
This is how it is done
Cheers,
Carl
More information about the opencms-dev
mailing list