t7e

T7e ===

T7e

translate = require 't7e'
translate.load greetings: hello: 'Hello'hey: 'Hey, $name!'
translate 'greetings.hello'
# 'Hello' 
translate 'span''greetings.hello'
# '<span data-t7e-key="greetings.hello">Hello</span>' 
 
translate 'span''greetings.hey'$name: 'you'
# '<span data-t7e-key="greetings.hey" data-t7e-name="you">Hey, you!</span>' 
translate.load greetings: hey: '¡Hola, $name!'
translate.refresh()
new t7e.Menu
  languages:
    'en-US':
      label: 'U.S. English'
      value: {}
    'es-MX':
      label: 'Español mexicano'
      value: './es-mx.json'

Language codes should match the codes returned by navigator.language.