| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 22 Dec 2025 17:09:35 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090909051617
location: https://web.archive.org/web/20090909051617/https://github.com/mcurry/js/tree/master
server-timing: captures_list;dur=0.798625, exclusion.robots;dur=0.070816, exclusion.robots.policy;dur=0.044635, esindex;dur=0.009031, cdx.remote;dur=22.833193, LoadShardBlock;dur=228.788469, PetaboxLoader3.datanode;dur=124.324402, PetaboxLoader3.resolve;dur=90.748592
x-app-server: wwwb-app246-dc8
x-ts: 302
x-tr: 299
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app246; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 22 Dec 2025 17:09:36 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Wed, 09 Sep 2009 05:16:17 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "a317c1e8e96b7e59f9328db2f03eaedd"
x-archive-orig-x-runtime: 171ms
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 21881
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Wed, 09 Sep 2009 05:16:17 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_11_20090909003312_crawl103.gpg-c/51_11_20090909051328_crawl101.arc.gz
server-timing: captures_list;dur=0.769428, exclusion.robots;dur=0.022174, exclusion.robots.policy;dur=0.007926, esindex;dur=0.009508, cdx.remote;dur=6.106738, LoadShardBlock;dur=180.013344, PetaboxLoader3.datanode;dur=89.900528, PetaboxLoader3.resolve;dur=119.549220, load_resource;dur=112.162579
x-app-server: wwwb-app246-dc8
x-ts: 200
x-tr: 365
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
mcurry's js at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| Description: | CakePHP plugin for localizing JavaScript edit |
| Homepage: | edit |
| Public Clone URL: |
git://github.com/mcurry/js.git
Give this clone URL to anyone.
git clone git://github.com/mcurry/js.git
|
| Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:mcurry/js.git
|
unknown (author)
Thu May 28 21:58:14 -0700 2009
js /
| name | age | message | |
|---|---|---|---|
| |
README | Loading commit data... |
|
| |
controllers/ | ||
| |
js_app_controller.php | ||
| |
js_app_model.php | ||
| |
models/ | ||
| |
tests/ |
README
/* * JS localize CakePHP Plugin * Copyright (c) 2009 Matt Curry * www.PseudoCoder.com * https://github.com/mcurry/js * * @author Matt Curry <matt@pseudocoder.com> * @license MIT * */ /* About */ This plugin allows you to create javascript files that include Cake's __() function, which translates strings. The plugin processes the files and caches them as static javascript files. /* Instructions */ 1. Download the plugin to /app/plugins/js. 2. There are two ways to use this plugin: a. If you want to keep a separate JavaScript file with all language strings: - Create the file as /app/webroot/js/source/lang.js. It will likely look something like this (but doesn't have to): var Lang = { Message1 : "<?php __('Message 1') ?>", Message2 : "<?php __('Message 2') ?>", }; - Then include your js file as lang/en.js. You can substitute "en" with any of the language codes supported. $javascript->link('lang/en.js'); b. If you want to include your localized strings right in the javascript code: - Put the files in /app/webroot/js/source/. For example if you had a site.js that had a bunch of JavaScript code mized with calles to __() the file would be: /app/webroot/js/source/site.js. - Then include your js file as lang/en/site.js. You can substitute "en" with any of the language codes supported. $javascript->link('lang/en/site.js'); 3. Cache - If debug is enabled no files are cached. - If debug is off files will be cached to the request location. - Delete the entire /app/webroot/js/lang dir to remove the cache - it's a good idea to do this as part of your build. /* How This Works */ When the first request is made no file actually exists. This causes Cake to catch the request and the request is handled by the plugin. The plugin looks for the base file in /source (this is configurable). The source file is processed by PHP so that all calls to __() are replaced with the correct strings. The resulting file is then saved to the file system so that the next request reads it directly.
This feature is coming soon. Sit tight!












