A jQuery plugin to convert between Simplified Chinese and Traditional Chinese.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8c39a90 Dec 27, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add bower config file Feb 10, 2014
README.md Update README.md Dec 27, 2016
bower.json set min required version of jQuery to 1.6 Feb 10, 2014
jquery.s2t.js set min required version of jQuery to 1.6 Feb 10, 2014
test.html Update jQuery url. Jan 2, 2016

README.md

#jquery-s2t

A jQuery plugin to convert between Simplified Chinese and Traditional Chinese.

Features

  • Convert string
  • Convert text in HTML Elements and all of its child nodes
  • Convert alt, placeholder, title attributes of HTML Elements
  • Support 2553 Simplified-Traditional entries
  • Tested in IE6+, Chrome, Firefox

Install

You can just download jquery.s2t.js, or install via bower:

bower install jquery-s2t

Usage

s2t convert Simplified Chinese to Traditional Chinese.

t2s convert Traditional Chinese to Simplified Chinese.

First You should import jQuery1.6+ and jquery.s2t.js:

<script type='text/javascript' src="jquery.min.js"></script>
<script type='text/javascript' src="jquery.s2t.js"></script>

Enjoy:

// Convert string
var result = $.s2t('我是程序员!');
var result = $.t2s('我是程序員!');

// Convert HTML Elements
$('.content-wap').s2t();
$('.content-wap').t2s();

Websites using jquery-s2t

None