cdn
4 years ago
lang
6 years ago
button.js
11 years ago
column.js
6 years ago
db.js
9 years ago
dialog.js
8 years ago
dialog_new.js
4 years ago
index.html
11 years ago
language.js
8 years ago
schedule.js
11 years ago
toolbar.js
5 years ago
language.js
37 lines
| 1 | window.wpfc = {}; |
| 2 | window.wpfc.translate = function(word){ |
| 3 | return (typeof window.wpfc.dictionary != "undefined" && typeof window.wpfc.dictionary[word] != "undefined" && window.wpfc.dictionary[word]) ? window.wpfc.dictionary[word] : word; |
| 4 | }; |
| 5 | jQuery.fn.extend({ |
| 6 | wpfclang: function(){ |
| 7 | var dictionary = window.wpfc.dictionary || {}; |
| 8 | var el = jQuery(this); |
| 9 | var text = el.attr("type") == "submit" ? el.val().trim() : el.text().trim(); |
| 10 | var converted = typeof dictionary[text] == "undefined" ? text : dictionary[text]; |
| 11 | |
| 12 | if(typeof converted != "undefined" && converted){ |
| 13 | if(el.attr("type") == "submit"){ |
| 14 | el.val(converted); |
| 15 | }else{ |
| 16 | el.html(converted); |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | }); |
| 21 | var Wpfclang = { |
| 22 | language : "", |
| 23 | init: function(language){ |
| 24 | this.language = language; |
| 25 | this.translate(); |
| 26 | }, |
| 27 | translate: function(){ |
| 28 | if(typeof window.wpfc != "undefined" && typeof window.wpfc.dictionary != "undefined"){ |
| 29 | var self = this; |
| 30 | jQuery('#wpfc-read-tutorial span, #wpfc-plugin-setup-warning h3, #just-h1, #get-now-h1, #new-features-h1, div.wpfc-premium-step-footer ul li a, div.wpfc-premium-step-footer p, div.wpfc-premium-step-content, #wpbody-content label, div.question, .questionCon input[type="submit"], #message p, .wrap h2, #nextVerAct, select option, th, #rule-help-tip h4, #rule-help-tip label, .omni_admin_sidebar h3, #message p, #wpfc-image-static-panel span, #wpfc-statics-right div, #wpfc-image-static-panel p, #container-show-hide-image-list span, #wpfc-image-list th').each(function(){ |
| 31 | if(jQuery(this).children().length === 0){ |
| 32 | jQuery(this).wpfclang(); |
| 33 | } |
| 34 | }); |
| 35 | } |
| 36 | } |
| 37 | }; |