掲示板
Embed Language Portlet in Theme
10年前 に Nithin KV によって更新されました。
Embed Language Portlet in Theme
Junior Member 投稿: 56 参加年月日: 12/07/23 最新の投稿
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.
10年前 に Sampsa Sohlman によって更新されました。
RE: Embed Language Portlet in Theme
Regular Member 投稿: 230 参加年月日: 07/09/27 最新の投稿
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
10年前 に Anil Sunkari によって更新されました。
RE: Embed Language Portlet in Theme
Expert 投稿: 427 参加年月日: 09/08/12 最新の投稿
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
9年前 に Nithin KV によって更新されました。