[gnome3-web] Add "in your language" links at the bottom of index page
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome3-web] Add "in your language" links at the bottom of index page
- Date: Fri, 1 Apr 2011 07:43:23 +0000 (UTC)
commit 5eb3933e7a5b9f06eb42de7959c04873a1ce6d4c
Author: Frédéric Péters <fpeters 0d be>
Date: Fri Apr 1 13:12:10 2011 +0530
Add "in your language" links at the bottom of index page
css/gnome3.css | 4 ++++
index.html | 24 +++++++++++++++++++++++-
js/language.js | 10 ++++++++++
po/build.sh | 4 ++++
4 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/css/gnome3.css b/css/gnome3.css
index 4e2e1ee..061546e 100644
--- a/css/gnome3.css
+++ b/css/gnome3.css
@@ -133,3 +133,7 @@ ul.navigation li a {
text-align: right;
color: gray;
}
+
+#languages {
+ margin: 1em 2em;
+}
diff --git a/index.html b/index.html
index 258696f..40deeb3 100644
--- a/index.html
+++ b/index.html
@@ -16,6 +16,7 @@
<script src="js/gnome3.js" type="text/javascript" charset="utf-8"></script>
<script src="js/countdown.js" type="text/javascript" charset="utf-8"></script>
<script src="js/showvideo.js" type="text/javascript" charset="utf-8"></script>
+<script src="js/language.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
@@ -98,7 +99,28 @@
<div class="grid_16 footer">
Copyright © 2011 <a href="http://www.gnome.org">The GNOME Project</a><br/>
Free to share and remix: <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons CC-BY</a><br/>
-Share on: <a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.gnome3.org%2F&t=GNOME%203">Facebook</a> | <a href="http://twitter.com/home?status=GNOME3%20-%20Introducing%20the%20next%20generation%20GNOME%20desktop%20http://www.gnome3.org">Twitter</a><br/>
+Share on: <a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.gnome3.org%2F&t=GNOME%203">Facebook</a> | <a href="http://twitter.com/home?status=GNOME3%20-%20Introducing%20the%20next%20generation%20GNOME%20desktop%20http://www.gnome3.org">Twitter</a>
+<div id="languages">
+<span>This website is available in many languages:</span>
+<a href="index.html.en">English</a> |
+<a href="index.html.af">Afrikaans</a> |
+<a href="index.html.cs">Ä?eÅ¡tina</a> |
+<a href="index.html.fa">Persian</a> |
+<a href="index.html.gl">Galego</a> |
+<a href="index.html.it">Italiano</a> |
+<a href="index.html.ja">���</a> |
+<a href="index.html.ko">í??êµì?´</a> |
+<a href="index.html.pl">Polski</a> |
+<a href="index.html.pt_BR">Português do Brasil</a> |
+<a href="index.html.ro">RomânÄ?</a> |
+<a href="index.html.sl">SlovenÅ¡Ä?ina</a> |
+<a href="index.html.sv">Svenska</a> |
+<a href="index.hmtl.ug">Uyghur</a> |
+<a href="index.html.zh_CN">ä¸æ?? (ä¸å?½å¤§é??)</a> |
+<a href="index.html.zh_HK">ä¸æ?? (é¦?港)</a> |
+<a href="index.html.zh_TW">ä¸æ?? (å?°ç?£)</a>
+</div>
+<br/>
â?§
</div><!-- grid_16 -->
</div> <!-- container_16 -->
diff --git a/js/language.js b/js/language.js
new file mode 100644
index 0000000..672b015
--- /dev/null
+++ b/js/language.js
@@ -0,0 +1,10 @@
+function setCookie(c_name, value, expiredays) {
+ document.cookie=c_name+ "=" +escape(value)+ ";path=/"+
+ ((expiredays==null) ? "" : ";expires="+exdate);
+}
+
+var url = window.location.toString();
+if ( (end=url.indexOf('.html.')) != -1) {
+ var lang = url.substring(end+6, end+9);
+ setCookie('language', lang, 30);
+}
diff --git a/po/build.sh b/po/build.sh
index f76cf2a..0a22bf8 100755
--- a/po/build.sh
+++ b/po/build.sh
@@ -22,3 +22,7 @@ do
done
done
+for HTMLFILE in ../*.html
+do
+ cp $HTMLFILE $HTMLFILE.en
+done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]