Fixed FELIX-2277 /Allow the user to select display language/
https://issues.apache.org/jira/browse/FELIX-2277

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@984311 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/resources/res/flags/bg.gif b/webconsole/src/main/resources/res/flags/bg.gif
new file mode 100644
index 0000000..11cf8ff
--- /dev/null
+++ b/webconsole/src/main/resources/res/flags/bg.gif
Binary files differ
diff --git a/webconsole/src/main/resources/res/flags/de.gif b/webconsole/src/main/resources/res/flags/de.gif
new file mode 100644
index 0000000..75728dd
--- /dev/null
+++ b/webconsole/src/main/resources/res/flags/de.gif
Binary files differ
diff --git a/webconsole/src/main/resources/res/flags/en.gif b/webconsole/src/main/resources/res/flags/en.gif
new file mode 100644
index 0000000..8f198f7
--- /dev/null
+++ b/webconsole/src/main/resources/res/flags/en.gif
Binary files differ
diff --git a/webconsole/src/main/resources/res/lib/support.js b/webconsole/src/main/resources/res/lib/support.js
index 3687e40..2228174 100644
--- a/webconsole/src/main/resources/res/lib/support.js
+++ b/webconsole/src/main/resources/res/lib/support.js
@@ -252,3 +252,15 @@
 	}
 	return element;
 }
+
+// language selection element
+var langSelect = false;
+$(document).ready(function() {
+	langSelect = $('#langSelect').hover( 
+		function() { $(this).find('.flags').show('blind') },
+		function() { $(this).find('.flags').hide('blind') });
+	langSelect.find('.flags img').click(function() {
+		$.cookies.set('felix.webconsole.locale', $(this).attr('alt'));
+		location.reload();
+	});
+});
diff --git a/webconsole/src/main/resources/res/ui/webconsole.css b/webconsole/src/main/resources/res/ui/webconsole.css
index 2219e94..4cf950d 100644
--- a/webconsole/src/main/resources/res/ui/webconsole.css
+++ b/webconsole/src/main/resources/res/ui/webconsole.css
@@ -170,3 +170,6 @@
 	float: left;
 	list-style: none
 }
+/* language selection element */
+#langSelect { position: absolute;	top: 5px; right: 5px }
+#langSelect img   { display: block; padding: 2px 0 }