File: index.html

package info (click to toggle)
jquery-i18n.js 1.1.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 100 kB
  • sloc: makefile: 8
file content (81 lines) | stat: -rw-r--r-- 2,899 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<title>jQuery i18n Plugin</title>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="../jquery.i18n.min.js"></script>

<script  type="text/javascript">
$(document).ready(function(){
	i18n_dict = {
		"Example 1"  							: "teiän veen",
		"Example 2"  							: "tei'än ve'en",
		"Example 3"  							: "teiä vede",
		"Example 4"  							: "teirän veren",
		"Example 5"  							: "teilän velen",
		"Example 6"  							: "teijjän vejen",
		"Example 7"  							: "teidän veden",
		"Example 8"  							: "teitän veten",
		"Example 9"  							: "teiðän veðen",
		"Example 10" 							: "teidhän vethen",
		"Dynamic Content" 				: "Your browser window is %s x %s",
		"Ordered Dynamic Content" : "%2$s is the height of your browser window, and %1$s is the width.",
		"HTML Content"            : "Your browser window is <b><i>%s</i></b> x <b><i>%s</i></b>"
	};

	$.i18n.load(i18n_dict);

	$('input#translate_button').click( function(event) {
		$('div#example1')._t('Example 1');
		$('div#example2')._t('Example 2');
		$('div#example3')._t('Example 3');
		$('div#example4')._t('Example 4');
		$('div#example5')._t('Example 5');
		$('div#example6')._t('Example 6');
		$('div#example7')._t('Example 7');
		$('div#example8')._t('Example 8');
		$('div#example9')._t('Example 9');
		$('div#example10')._t('Example 10');
		$('div#dynamic')._t('Dynamic Content', $(document).width(), $(document).height());
		$('div#orderedDynamic')._t('Ordered Dynamic Content', $(document).width(), $(document).height());
		$('div#html')._t('HTML Content', $(document).width(), $(document).height());
	});
});
</script>
<style type="text/css">
	body {
		font-size: 30px;
		text-align: center;
	}
	input {
		font-size: 30px;
	}
	p {
		font-size: 17px;
	}
</style>

<body>
	<p>
		Click the button to translate the following text into some random Finnish from the
		<a href='http://en.wikipedia.org/wiki/Finnish_phonology'>Wikipedia Finnish Phonology Article</a>
	</p>

	<div id='example1'>Example 1</div>
	<div id='example2'>Example 2</div>
	<div id='example3'>Example 3</div>
	<div id='example4'>Example 4</div>
	<div id='example5'>Example 5</div>
	<div id='example6'>Example 6</div>
	<div id='example7'>Example 7</div>
	<div id='example8'>Example 8</div>
	<div id='example9'>Example 9</div>
	<div id='example10'>Example 10</div>
	<div id='dynamic'>Dynamic Content</div>
	<div id='orderedDynamic'>Ordered Dynamic Content</div>
	<div id='html'>HTML Content</div>

	<input type='button' id='translate_button' value='Internationalize!' />
</body>
</html>