A simple i18n plugin which use Google spreadsheet as source data
http://sketchytechky.github.com/jquery-i18n-googlespreadsheet/
http://sketchytechky.github.com/jquery-i18n-googlespreadsheet/tests/SpecRunner.html
Simplistic. Simplista.
<!-- dependency -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="google-spreadsheet-javascript/google-spreadsheet.js"></script>
<!-- real script -->
<script src="i18ngss.js"> </script>
<a href="#" class="translate-button" data-lang="EN">English</a>
<a href="#" class="translate-button" data-lang="JP">Japanese</a>
<!-- will grab the profile-lefttxt1 token from spreadsheet -->
<span class="translate-token" data-translate-token="profile-lefttxt1"></span>
<!-- allow markdown -->
<span class="translate-token" data-translate-token="profile-lefttxt1" data-markdown=1 data-noanimate=1></span>
<script>
// will be whatever the column name
var i = new $.i18n("https://docs.google.com/spreadsheet/pub?key=0Al0uCQDAjJijdENaMlQ0RlJBR3dQVUdrQ3BGVk9qYnc&output=html", ["EN", "JP"], "translate");
// translate one token
//var tranalste = i.translateToken('profile-lefttxt1');
</script>
To create the spreadsheet, see example at:
https://docs.google.com/spreadsheet/pub?key=0Al0uCQDAjJijdENaMlQ0RlJBR3dQVUdrQ3BGVk9qYnc&output=html
And make sure it is published (see https://github.com/mikeymckay/google-spreadsheet-javascript/ for further info)
Imported script from following repo
- https://github.com/mikeymckay/google-spreadsheet-javascript/
- https://github.com/evilstreak/markdown-js
(hopfully one day github-pages support submodules)