Fórum
Embed Language Portlet in Theme
Nithin KV, modificado 10 Anos atrás.
Embed Language Portlet in Theme
Junior Member Postagens: 56 Data de Entrada: 23/07/12 Postagens Recentes
Hi,
I have embedded language portlet in theme using $theme.language("fm", null, "languageId", 1) and i have set locales= en_US,ar_SA in my portat-ext.properties.
Currently it is displaying both english and arabic languages in my theme.
But i need to display only Arabic Language link when my page is in English and vice versa.
How do i do it ??.. Kindly help me.
I have embedded language portlet in theme using $theme.language("fm", null, "languageId", 1) and i have set locales= en_US,ar_SA in my portat-ext.properties.
Currently it is displaying both english and arabic languages in my theme.
But i need to display only Arabic Language link when my page is in English and vice versa.
How do i do it ??.. Kindly help me.
Sampsa Sohlman, modificado 10 Anos atrás.
RE: Embed Language Portlet in Theme
Regular Member Postagens: 230 Data de Entrada: 27/09/07 Postagens Recentes
Hi Nithin,
Just filter the all languages and remove current:
Example:
Best regards,
Sampsa
Just filter the all languages and remove current:
Example:
#set($availableLocales = $languageUtil.getAvailableLocales())
#set($selectedLanguageIds=[])
#foreach( $availableLocale in $availableLocales )
#if($locale != $availableLocale)
#set($VOID = $selectedLanguageIds.add($availableLocale))
#end
#end
$theme.language(null, null, "languageId",$arrayUtil.toStringArray($selectedLanguageIds.toArray()), 0)
Best regards,
Sampsa
Anil Sunkari, modificado 10 Anos atrás.
RE: Embed Language Portlet in Theme
Expert Postagens: 427 Data de Entrada: 12/08/09 Postagens Recentes
Hi Nithin,
I think this is for AL E__M, if so we can get the locale and based on that you can show the links.
Regards,
Anil Sunkari
I think this is for AL E__M, if so we can get the locale and based on that you can show the links.
Regards,
Anil Sunkari
Nithin KV, modificado 9 Anos atrás.