Kamis, 09 Agustus 2012

Web page Al Bhed translator javascript (bookmarklet)

well long time no post :D

recently I don't have much to do and rather than dying from boredom I created a simple javascript to translate a web page to Al Bhed language (from Final Fantasy X if you're wondering)

The Base translation mapping come from http://nysa.cx/albhed/ and I just converted it to javascript.

Anyway here are the script:
javascript: (function(){var f=document.createElement('script'); f.src = 'http://al-bhed-page-translator-js.googlecode.com/files/albhed.js'; document.head.appendChild(f);})();
just copy and paste it into the browser address bar in the page you want to translate. (keep in mind that newer firefox block this kind of script, and you need to use bookmarklet for that)

To translate the page back to original, simply use this script:
javascript: (function(){alTranslate(true);})();

That's it :)

Known bugs:
- html encoded character such as   didn't translate properly, it's fixable but I'm too lazy to fix it :P
- huge page might causing the browser to freeze, also should be fixable by adding some timeout but again, I'm lazy :D