[sword-svn] r328 - trunk/webapp

refdoc at www.crosswire.org refdoc at www.crosswire.org
Tue Nov 4 05:07:03 MST 2008


Author: refdoc
Date: 2008-11-04 05:07:02 -0700 (Tue, 04 Nov 2008)
New Revision: 328

Modified:
   trunk/webapp/index.jsp
   trunk/webapp/init.jsp
Log:
introduction of a installer configurable language choice



Modified: trunk/webapp/index.jsp
===================================================================
--- trunk/webapp/index.jsp	2008-11-02 00:52:56 UTC (rev 327)
+++ trunk/webapp/index.jsp	2008-11-04 12:07:02 UTC (rev 328)
@@ -53,6 +53,14 @@
 <% } %>
 		</ul>
 </div>
+<div id="language">
+<h2><t:t>Languages:</t:t></h2>
+		<ul>
+<% for (int i = 0; i < offeredLanguages.size(); i++) { %>
+			<li><a href="index.jsp?lang=<%= URLEncoder.encode((String)offeredLanguages.get(i)) %>" title="<%= (String) offeredLanguages.get(i) %>"><t:t><%= (String) offeredLanguages.get(i) %></t:t></a></li>
+<% } %>
+		</ul>
+</div>
 
 
    <div id="externallinks">

Modified: trunk/webapp/init.jsp
===================================================================
--- trunk/webapp/init.jsp	2008-11-02 00:52:56 UTC (rev 327)
+++ trunk/webapp/init.jsp	2008-11-04 12:07:02 UTC (rev 328)
@@ -24,10 +24,12 @@
 	static Vector tabTitles = null;
 	static Vector tabDefaults = null;
 	static Vector rtolLangs = null;
+	static Vector offeredLanguages = null;
 	static String defaultBible = null;
 	static String defaultLang = null;
 	static String defaultStyle = null;
 	static Properties swordWebConfig = null;
+	static String languages = null;
 %>
 
 <%
@@ -46,7 +48,15 @@
 			defaultBible = swordWebConfig.getProperty("defaultBible", "NASB");
 			defaultLang  = swordWebConfig.getProperty("defaultLang", "en_US");
 			defaultStyle = swordWebConfig.getProperty("defaultStyle", "Washed Out");
+			
+			offeredLanguages = new Vector();
+			String languages = swordWebConfig.getProperty("offeredLanguages", "en_US");
+			String[] language = languages.split(" ");
+			for (int i = 0; i < language.length; i++) {
+				offeredLanguages.add(language[i]);
+			}			
 
+
 			styleNames = new Vector();
 			styleFiles = new Vector();
 			styleDescriptions = new Vector();




More information about the sword-cvs mailing list