Template:JSGChapters

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

Revision Content

<% var LOCALE = env.locale; var OUTPUT; var Arrs = { en: [ "/en-US/docs/JavaScript/Guide", "/en-US/docs/JavaScript/Guide/About", "/en-US/docs/JavaScript/Guide/JavaScript_Overview", "/en-US/docs/JavaScript/Guide/Values,_variables,_and_literals", "/en-US/docs/JavaScript/Guide/Expressions_and_Operators", "/en-US/docs/JavaScript/Guide/Regular_Expressions", "/en-US/docs/JavaScript/Guide/Statements", "/en-US/docs/JavaScript/Guide/Functions", "/en-US/docs/JavaScript/Guide/Working_with_Objects", "/en-US/docs/JavaScript/Guide/Predefined_Core_Objects", "/en-US/docs/JavaScript/Guide/Details_of_the_Object_Model", "/en-US/docs/JavaScript/Guide/Inheritance_Revisited", "/en-US/docs/JavaScript/Guide/Iterators_and_Generators", "/en-US/docs/JavaScript/Guide/Closures", "/en-US/docs/JavaScript/Guide/LiveConnect_Overview", "/en-US/docs/E4X/Processing_XML_with_E4X" ] } switch (LOCALE) { case "ja": for(var i = 0, aLen = Arrs.length; i < aLen; ++i) { Arr[i] = Arr[i].replace(/en-US, "/ja"); } OUTPUT = Arrs.en; break; default: OUTPUT = Arrs.en; break; } %><%- OUTPUT %>

Revision Source

<%
var LOCALE = env.locale;
var OUTPUT;

var Arrs = {
    en: [
    "/en-US/docs/JavaScript/Guide",
    "/en-US/docs/JavaScript/Guide/About",
    "/en-US/docs/JavaScript/Guide/JavaScript_Overview",
    "/en-US/docs/JavaScript/Guide/Values,_variables,_and_literals",
    "/en-US/docs/JavaScript/Guide/Expressions_and_Operators",
    "/en-US/docs/JavaScript/Guide/Regular_Expressions",
    "/en-US/docs/JavaScript/Guide/Statements",
    "/en-US/docs/JavaScript/Guide/Functions",
    "/en-US/docs/JavaScript/Guide/Working_with_Objects",
    "/en-US/docs/JavaScript/Guide/Predefined_Core_Objects",
    "/en-US/docs/JavaScript/Guide/Details_of_the_Object_Model",
    "/en-US/docs/JavaScript/Guide/Inheritance_Revisited",
    "/en-US/docs/JavaScript/Guide/Iterators_and_Generators",
    "/en-US/docs/JavaScript/Guide/Closures",
    "/en-US/docs/JavaScript/Guide/LiveConnect_Overview",
    "/en-US/docs/E4X/Processing_XML_with_E4X"
    ]
}


switch (LOCALE) {
    case "ja":
        for(var i = 0, aLen = Arrs.length; i < aLen; ++i) {
            Arr[i] = Arr[i].replace(/en-US, "/ja");
        }
        OUTPUT = Arrs.en;
        break;
    default:
        OUTPUT = Arrs.en; break;
}


%><%- OUTPUT %>
Revert to this revision