diff --git a/.classpath b/.classpath
index b297109..b2b5d4b 100644
--- a/.classpath
+++ b/.classpath
@@ -33,9 +33,9 @@
-
-
+
+
diff --git a/.project b/.project
index a3ef3c1..82738f3 100644
--- a/.project
+++ b/.project
@@ -3,8 +3,6 @@
Kiss4web-demo
- kiss4web
- xidyn
diff --git a/WebContent/WEB-INF/lib/xidyn-1.1.0-sources.zip b/WebContent/WEB-INF/lib/xidyn-1.1.3-sources.zip
similarity index 90%
rename from WebContent/WEB-INF/lib/xidyn-1.1.0-sources.zip
rename to WebContent/WEB-INF/lib/xidyn-1.1.3-sources.zip
index f0ad6c9..fa1d2e2 100644
Binary files a/WebContent/WEB-INF/lib/xidyn-1.1.0-sources.zip and b/WebContent/WEB-INF/lib/xidyn-1.1.3-sources.zip differ
diff --git a/WebContent/WEB-INF/lib/xidyn-1.1.0.jar b/WebContent/WEB-INF/lib/xidyn-1.1.3.jar
similarity index 83%
rename from WebContent/WEB-INF/lib/xidyn-1.1.0.jar
rename to WebContent/WEB-INF/lib/xidyn-1.1.3.jar
index 6a8be54..7aac4f3 100644
Binary files a/WebContent/WEB-INF/lib/xidyn-1.1.0.jar and b/WebContent/WEB-INF/lib/xidyn-1.1.3.jar differ
diff --git a/src/fr/devinsy/kiss4web/demo/website/charter/charter.html b/src/fr/devinsy/kiss4web/demo/website/charter/charter.html
index 8cda721..e2fa306 100644
--- a/src/fr/devinsy/kiss4web/demo/website/charter/charter.html
+++ b/src/fr/devinsy/kiss4web/demo/website/charter/charter.html
@@ -37,6 +37,7 @@
Repeat tag (w/o index)
Fill Table
Iteration strategies
+ Languages
diff --git a/src/fr/devinsy/kiss4web/demo/website/xidyn/Index_xhtml.java b/src/fr/devinsy/kiss4web/demo/website/xidyn/Index_xhtml.java
index 0ddb6f2..aa809b6 100644
--- a/src/fr/devinsy/kiss4web/demo/website/xidyn/Index_xhtml.java
+++ b/src/fr/devinsy/kiss4web/demo/website/xidyn/Index_xhtml.java
@@ -19,6 +19,7 @@
package fr.devinsy.kiss4web.demo.website.xidyn;
import java.io.IOException;
+import java.util.Locale;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -32,6 +33,7 @@ import fr.devinsy.util.strings.StringList;
import fr.devinsy.xidyn.data.SimpleTagData;
import fr.devinsy.xidyn.pages.Page;
import fr.devinsy.xidyn.pages.PageFactory;
+import fr.devinsy.xidyn.utils.XidynUtils;
/**
*
@@ -351,6 +353,46 @@ public class Index_xhtml extends HttpServlet
}
}
+ // Step #06.
+ {
+ try
+ {
+ System.out.println("----------------------------");
+
+ Page defaultPage = new Page("/fr/devinsy/kiss4web/demo/website/xidyn/languages_demo.html");
+ Page frenchPage = new Page("/fr/devinsy/kiss4web/demo/website/xidyn/languages_demo.html", Locale.FRENCH);
+ Page germanPage = new Page("/fr/devinsy/kiss4web/demo/website/xidyn/languages_demo.html", Locale.GERMAN);
+
+ String defaultHtml = XidynUtils.extractBodyContent(defaultPage.dynamizeToString());
+ String frenchHtml = XidynUtils.extractBodyContent(frenchPage.dynamizeToString());
+ String germanHtml = XidynUtils.extractBodyContent(germanPage.dynamizeToString());
+
+ StringList display = new StringList();
+ display.appendln("No locale set
");
+ display.append("new Page(\"/fr/devinsy/kiss4web/demo/website/xidyn/languages_demo.html\");").appendln("
");
+ display.append("=>").appendln("
");
+ display.append(StringEscapeUtils.escapeXml(defaultHtml)).appendln("
").appendln("
");
+ display.appendln("
");
+
+ display.appendln("French locale set
");
+ display.append("new Page(\"/fr/devinsy/kiss4web/demo/website/xidyn/languages_demo.html\", Locale.FRENCH);").appendln("
");
+ display.append("=>").appendln("
");
+ display.append(StringEscapeUtils.escapeXml(frenchHtml)).appendln("
");
+ display.appendln("
");
+
+ display.appendln("German locale set without associated file
");
+ display.append("new Page(\"/fr/devinsy/kiss4web/demo/website/xidyn/languages_demo.html\", Locale.GERMAN);").appendln("
");
+ display.append("=>").appendln("
");
+ display.append(StringEscapeUtils.escapeXml(germanHtml)).appendln("
");
+
+ demoPage.setContent("demo6", display.toString());
+ }
+ catch (Exception exception)
+ {
+ demoPage.setContent("demo6", exception.getMessage());
+ }
+ }
+
//
Page charter = PageFactory.instance().create("/fr/devinsy/kiss4web/demo/website/charter/charter.html");
charter.include("content_container", demoPage);
diff --git a/src/fr/devinsy/kiss4web/demo/website/xidyn/index.html b/src/fr/devinsy/kiss4web/demo/website/xidyn/index.html
index 6e10e50..3d85fc3 100644
--- a/src/fr/devinsy/kiss4web/demo/website/xidyn/index.html
+++ b/src/fr/devinsy/kiss4web/demo/website/xidyn/index.html
@@ -85,5 +85,9 @@
n/a
n/a
+ Languages
+
+ n/a
+