Localization

Support for localization. Fixes #1.
Includes commits for sharing (pull request #20) since I'm tired of fighting with git ;)

The main function was called when the page is fully loaded. It is now called when it is fully translated.