1.0.0 • Published 5 years ago

jquery-come-translate v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

History

One way solution to convert text between multiple languages in browser. No any dependencies required.

Installation + Use

  1. Install the npm
npm install jquery-come-translate --save
  1. Import the script tag after the jQuery
<!-- jQuery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- JQuery extension `Come Translate` -->
<script src="js/languages.pack.js"></script>
<script src="dist/js/jquery-come-translate.js"></script>
<script>
$(function () {

    $.translate(function() {}, {debug: true, translation: dict, language: 'zhTW', attribute: 'my-data'});
    //$.translate(function() {}, {debug: true, translation: dict, language: $.language('enUS'), attribute: 'my-data'});
});
</script>
<body>
<div><my-data id="test"></my-data></div>
</body>

Test

npm install -g lite-server
lite-server

License

MIT