jquery-come-translate

1.0.0 • Public • Published

jquery-come-translate

jQuery plugin for translation (manually define difference translations).



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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i jquery-come-translate

      Weekly Downloads

      0

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      63.8 kB

      Total Files

      11

      Last publish

      Collaborators

      • ssmak