Commits

Anonymous committed e58c7cb

Add the lang_switch API.

  • Participants
  • Parent commits 6d29480

Comments (0)

Files changed (2)

File lib/lang_switch.wml

+<define-tag lang_switch>
+<preserve url:eng url:heb />
+<set-var %attributes />
+<div class="lang_switch">
+<ul>
+<li class="title"><b>Switch Language</b></li>
+<li class="lang"><a href="<get-var url:eng />">English</a></li>
+<li class="lang"><a href="<get-var url:heb />">Hebrew (עברית)</a></li>
+</ul>
+</div>
+<restore url:eng url:heb />
+</define-tag>

File lib/pages/t2/humour/ways_to_do_it.wml

-<div class="lang_switch">
-<ul>
-<li class="title"><b>Switch Language</b></li>
-<li class="lang"><a href="ways_to_do_it.html">English</a></li>
-<li class="lang"><a href="ways_to_do_it-heb.html">Hebrew (עברית)</a></li>
-</ul>
-</div>
+#include "lang_switch.wml"
+<lang_switch 
+    url:eng="$(ROOT)/humour/ways_to_do_it.html"
+    url:heb="$(ROOT)/humour/ways_to_do_it-heb.html"
+    />