Semantics is a simple yet powerful i18n library for JavaScript, built for both Node and the web.
Note: Semantics is in v0; it should not be considered stable.
npm i semantics-i18n
const Semantics = require('semantics-i18n');
<script src="path/to/semantics.js"></script>
<!-- Semantics will be declared as a global object -->
var $ = Semantics('es', {
"values": {
"Hello": "Hola",
"Yes": "Sí",
"No": "No",
"Maybe": "Tal vez"
}
});
$('Hello'); // "Hola"