-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.html
82 lines (77 loc) · 3.21 KB
/
default.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>jQuery.i18n.properties: Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-script-type" content="text/javascript" />
<!-- JS -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://codingwithcoffee.com/files/trunk/jquery.i18n.properties.js"></script>
<script type="text/javascript">
function onSubmit(){
alert(msg_alert);
}
jQuery(document).ready(function() {
jQuery.i18n.properties({
name:'Messages',
path:'bundle/',
mode:'both',
language:'pt',
callback: function() {
// We specified mode: 'both' so translated values will be
// available as JS vars/functions and as a map
// Accessing a simple value through the map
jQuery.i18n.prop('msg_first');
jQuery.i18n.prop('msg_last');
jQuery.i18n.prop('msg_phone');
jQuery.i18n.prop('msg_email');
jQuery.i18n.prop('msg_address');
jQuery.i18n.prop('msg_note');
jQuery.i18n.prop('msg_submit');
jQuery.i18n.prop('msg_title');
jQuery.i18n.prop('msg_alert');
$('#lbleadFirstName').text(msg_first);
$('#lbleadLastName').text(msg_last);
$('#lbleadPhone').text(msg_phone);
$('#lbleadEmail').text(msg_email);
$('#lbleadAddress').text(msg_address);
$('#lbleadNote').text(msg_note);
$('#button1').text(msg_submit);
$('#title').html(msg_title);
// Accessing a value with placeholders through a JS function
//alert(msg_complex('John'));
}
});
});
</script>
</head>
<body>
<H2 id="title"></H2><br>
<div class="form-group">
<label for="leadFirstName" id="lbleadFirstName">Lead First Name:</label>
<input name="leadFirstName" id="leadFirstName" type="text" class="form-control">
</div>
<div class="form-group">
<label for="leadLastName" id="lbleadLastName">Lead Last Name:</label>
<input name="leadLastName" id="leadLastName" type="text" class="form-control">
</div>
<div class="form-group">
<label for="leadPhone" id="lbleadPhone">Lead Phone:</label>
<input name="leadPhone" id="leadPhone" type="text" class="form-control">
</div>
<div class="form-group">
<label for="leadEmail" id="lbleadEmail">Lead E-mail:</label>
<input name="leadEmail" id="leadEmail" type="text" class="form-control">
</div>
<div class="form-group">
<label for="leadAddress" id="lbleadAddress">Lead Address:</label>
<input name="leadAddress" id="leadAddress" type="text" class="form-control">
</div>
<div class="form-group">
<label for="leadNote" id="lbleadNote">Lead Note:</label>
<textarea name="leadNote" id="leadNote" rows="5" class="form-control"
style="resize: none;"></textarea>
</div>
<button type="submit" class="btn btn-primary" id="button1" onclick="onSubmit()">ok</button>
</body>
</html>