Author: jacopoc
Date: Fri Jun 1 01:25:29 2007
New Revision: 543425
URL:
http://svn.apache.org/viewvc?view=rev&rev=543425Log:
Applied patch from Arno Peters (OFBIZ-1003) to show the language names in the select box of the ecommerce in the language they are referring to.
Modified:
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/language.ftl
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/language.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/language.ftl?view=diff&rev=543425&r1=543424&r2=543425==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/language.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/includes/language.ftl Fri Jun 1 01:25:29 2007
@@ -24,18 +24,13 @@
<div class="screenlet-body" style="text-align: center;">
<form method="post" name="chooseLanguage" action="<@ofbizUrl>setSessionLocale</@ofbizUrl>" style="margin: 0;">
<select name="locale" class="selectBox">
- <#assign initialDisplayName = locale.getDisplayName(locale)>
- <#if 18 < initialDisplayName?length>
- <#assign initialDisplayName = initialDisplayName[0..15] + "...">
- </#if>
- <option value="${locale.toString()}">${initialDisplayName}</option>
- <option value="${locale.toString()}">----</option>
<#list availableLocales as availableLocale>
- <#assign displayName = availableLocale.getDisplayName(locale)>
- <#if 18 < displayName?length>
- <#assign displayName = displayName[0..15] + "...">
+ <#assign langAttr = availableLocale.toString()?replace("_", "-")>
+ <#assign langDir = "ltr">
+ <#if "ar.iw"?contains(langAttr?substring(0, 2))>
+ <#assign langDir = "rtl">
</#if>
- <option value="${availableLocale.toString()}">${displayName}</option>
+ <option lang="${langAttr}" dir="${langDir}" value="${availableLocale.toString()}"<#if locale.toString() = availableLocale.toString()> selected="selected"</#if>>${availableLocale.getDisplayName(availableLocale)}</option>
</#list>
</select>
<div><a href="javascript:document.chooseLanguage.submit()" class="buttontext">${uiLabelMap.CommonChange}</a></div>