Re: How to display language flags using java?
Philippe Vollenweider <[email protected]>
| Newsgroups | gmane.comp.cms.jahia.template |
|---|---|
| Message-ID | <[email protected]> |
Well, you can generate the html code for the rollover. It should be quite easy. Cheers, Philippe. At 28.10.2004 16:42, you wrote: >Thank you, that works ok for now. >I don't get the cool effects with the switching flags right away but I'll >work on that. > >/Christian > >Philippe Vollenweider <[email protected]> wrote on 2004-10-27 >17:22:21: > > > Hello, > > > > You can get the flag like this: > > > > String flagUrl = jData.params().getRequest().getContextPath() + > > "/jsp/jahia/engines/images/flags/" + languageCode + "_on.gif"; > > > > Cheers, > > > > Philippe. > > > > At 27.10.2004 17:03, you wrote: > > > > > > > > > > >Hello all! > > >I'm trying to change the behavior of language.jsp in the > > >corporate_portal_templates to display using css instead of tables. I've > > >changed the part that dealing with the table structure and it works >fine. > > >But then I want to output the actual flag and I tried something like >this: > > > > > > if (displayLink) { > > > l++; > > > displayTable = true; > > > if (l > 1){ > > > sb.append(" | "); > > > } > > > Locale localeLangToDisplay = > > >LanguageCodeConverters.languageCodeToLocale(languageCode); > > > String languageName = > > >localeLangToDisplay.getDisplayLanguage(localeLangToDisplay) + " [" + > > >localeLangToDisplay.getDisplayName() + "]"; > > >%> > > > <jahia:displayLanguageFlag code="<%=languageCode%>" > > > > > >href='<%=currentLanguageCode.equals(languageCode) ? "" : > > >jData.gui().drawPageLanguageSwitch(languageCode)%>' > > > alt="<%=languageName%>"/> > > > <%} > > > > > >} > > >The jahia:displayLanguageFlag tag outputs html directly and the >resulting > > >html page snip then becomes > > > > > > <a href="/jahia/Jahia/lang/en/pid/2" > > > onMouseOut="MM_swapImgRestore()" > > > > > > >onMouseOver="MM_swapImage('flagImg90','','/jahia/jsp/jahia/engines/images > /flags/en_on. > > > gif',1)"> > > ><img name="flagImg90" border="0" alt="English [engelska]" > > >src="/jahia/jsp/jahia/engines/images/flags/en_off.gif"></a> > > > <div class="quicklink"></div> > > > > > >And what I want to do is to have the link inside the div tag. > > > > > >How can I get the html code for the flag to append to string buffer sb? > > >I tried reading the org.jahia.taglibs.button.displayLanguageFlagTag java > > >file but it doesn't seems like the easy way to go. > > > > > >Thanks, > > >Christian > > > > -------=[ pvollenweider at jahia dot com ]=--------- > > Jahia : A collaborative source CMS and Portal Server > > www.jahia.org Community and product web site > > www.jahia.com Commercial services company > > -------=[ pvollenweider at jahia dot com ]=--------- Jahia : A collaborative source CMS and Portal Server www.jahia.org Community and product web site www.jahia.com Commercial services company