One javascript file per language containing literals - this would be better to be a more dynamic data store - that could come next.
One javascript file containing functionality
Still pretty simple. Both HelloWorld and Hola still call a javascript function called greet(); They both include 2 javascript file, the generic Greetings.js and the language dependent literals-xx-YY.js file
greet() is defined in Greetings.js
It is defined as
function greet()
{
document.writeln(GREET);
}
GREET is defined in Literals-en-GB.js as
var GREET = 'hello';
and in Literals-es-ES.js as
var GREET = 'hola!';
Get files: