Template:DOMLiveSample

  • Revision slug: Template:DOMLiveSample
  • Revision title: Template:DOMLiveSample
  • Revision id: 294785
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

<% /* one parameter: name of sample's file in /samples/domref */ /* get the page language */ var lang = env.locale; var str = "View the live example"; var target = "/samples/domref/" + $0; // Localizers: add a case to this switch statement // for your language switch(lang) { case 'de': str = "Live-Beispiel ansehen"; break; case 'fr': str = "Voir l'exemple sur une page"; break; case 'ja': str = "実際の表示を確認"; break; case 'zh-CN': str = "查看示例"; break; default : str = "View the live example"; break; } %><%-str%>

Revision Source

<%
/* one parameter: name of sample's file in /samples/domref */
/* get the page language */

var lang = env.locale;
var str = "View the live example";
var target = "/samples/domref/" + $0;

// Localizers: add a case to this switch statement
// for your language

switch(lang) {
  case 'de': str = "Live-Beispiel ansehen"; break;
  case 'fr': str = "Voir l'exemple sur une page"; break;
  case 'ja': str = "実際の表示を確認"; break;
  case 'zh-CN': str = "查看示例"; break;
  default : str = "View the live example"; break;
}

%><a class="button liveSample" href="<%=target%>"><%-str%></a>
Revert to this revision