Hello Jyoti,
if you want to display the same content in multiple languages on one page,
so that the user does not have to switch the languages, you can try it by
using the API instead of the Jahia taglibs.
<content:absoluteContainerList ...>
<content:container id="contentContainer">
ContainerBean containerBean = (ContainerBean)pageContext.findAttribute("
contentContainer");
// the fields in the current language are accessed with
String currentLangFieldValue = containerBean.getFieldvalue("fieldname");
// for fields in other languages you could try
EntryLoadRequest diffLangLoadRequest = jParams.getEntryLoadRequest
().clone();
diffLangLoadRequest.setFirstLocale(wantedLanguageCode);
// by the way: with
containerBean.getContentContainer().getLanguagesStatesWithoutChilds()
you get a map with all
// existing language code keys and their workflow states for the current
container
JahiaContainer diffLangContainer =
containerBean.getContentContainer().getJahiaContainer(jParams,
diffLangLoadRequest);
String diffLangFieldValue = diffLangContainer.getFieldvalue("fieldname");
</content:container>
</content:absoluteContainerList ...>
Another way you could possibly do it is after for instance using
the <content:textField id="yourFieldIdName"...> you could call
FieldBean fieldBean = (FieldBean)pageContext.findAttribute("yourFieldIdName
") ;
and then calling
ContentObjectEntryState diffLangEntryState = new ContentObjectEntryState(
jParams.getEntryLoadRequest().getWorkflowState(),
jParams.getEntryLoadRequest().getVersionID(),
yourWantedLanguageCode);
String diffLangValue = fieldBean.getContentField().getValue(
diffLangEntryState);
I suppose the first is faster, if you have many fields in a container to be
translated and the second will be faster if it is only one or a few fields,
which need to be shown in different languages.
But I do not want to guarantee you, that it works at all, as I have not
tried it yet, but theoretically it should work like that.
Greetings,
Benjamin
2007/2/12, Jyoti Gheji <[EMAIL PROTECTED]>:
Hi,
Currently Jahia enables the entire site to be viewed in multiple languages
on the click of the multi-language tabs.
Is there anyway of viewing only the content on a page in Multiple
languages ?
Thanks,
Jyoti Gheji
------------------------------
***************************************************************************************************************************
This e-mail communication and any attachments may be privileged and
confidential to Hexaware and are intended only for the
use of the recipients named above. If you are not the intended recipient,
please do not review, disclose, disseminate,
distribute or copy this e-mail and attachments. If you have received this
email in error, please delete the same alongwith
all attachments thereto and notify us immediately at
[EMAIL PROTECTED] .
***************************************************************************************************************************