svn commit: r544435 - /ofbiz/branches/release4.0/applications/ecommerce/webapp/ecommerce/includes/language.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r544435 - /ofbiz/branches/release4.0/applications/ecommerce/webapp/ecommerce/includes/language.ftl

lektran
Author: lektran
Date: Tue Jun  5 02:54:05 2007
New Revision: 544435

URL: http://svn.apache.org/viewvc?view=rev&rev=544435
Log:
Applied fix from trunk for revision: 543425

Modified:
    ofbiz/branches/release4.0/applications/ecommerce/webapp/ecommerce/includes/language.ftl

Modified: ofbiz/branches/release4.0/applications/ecommerce/webapp/ecommerce/includes/language.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/ecommerce/webapp/ecommerce/includes/language.ftl?view=diff&rev=544435&r1=544434&r2=544435
==============================================================================
--- ofbiz/branches/release4.0/applications/ecommerce/webapp/ecommerce/includes/language.ftl (original)
+++ ofbiz/branches/release4.0/applications/ecommerce/webapp/ecommerce/includes/language.ftl Tue Jun  5 02:54:05 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>