given there is a normal page with some portlets and the change language portlet. Is it possible to hide specific portlets for specific languages? Maybe via Portlet prefrences (only show for these locales....)?
Thanks in advance.
you can use an if statement in your portlet and use following code:
<%ThemeDisplay themeDisplay = new ThemeDisplay();
String langid=null;
if(LanguageUtil.getLanguageId(request).equals("fa_IR"))
{
//display Farsi portlet
}
%>
<%=langid%>
or for better result you can use a switch statement
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With