forked from acdha/djangocon-internationalization-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
design.html
executable file
·167 lines (140 loc) · 7.11 KB
/
design.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
<meta name="viewport" content="width=1024, user-scalable=no">
<title>Building International Sites: Design Strategies</title>
<!-- Required stylesheet -->
<link rel="stylesheet" href="deck.js/core/deck.core.css">
<link rel="stylesheet" href="deck.js/extensions/goto/deck.goto.css">
<link rel="stylesheet" href="deck.js/extensions/menu/deck.menu.css">
<link rel="stylesheet" href="deck.js/extensions/navigation/deck.navigation.css">
<link rel="stylesheet" href="deck.js/extensions/status/deck.status.css">
<link rel="stylesheet" href="deck.js/extensions/hash/deck.hash.css">
<link rel="stylesheet" href="deck.js/themes/style/swiss.css">
<link rel="stylesheet" href="custom.css">
<script src="deck.js/modernizr.custom.js"></script>
</head>
<body class="deck-container">
<section class="slide" id="intro">
<h1>Design Strategies</h1>
</section>
<section class="slide" id="language-policies">
<h2>Language Policies</h2>
<ul>
<li>Who chooses which languages are supported?</li>
<li>
How does language affect with your concept of “things” on
the site?
</li>
<li>
How should language affect your URL structure?
<table>
<caption>Which seems cleaner?</caption>
<tr>
<td><samp>/wiki/MyCoolIdea</samp></td>
<td><samp>/en/wiki/MyCoolIdea</samp></td>
</tr>
<tr>
<td><samp>/conference/djangocon-us/2012/</samp></td>
<td><samp>/gr/conference/djangocon-us/2012/</samp></td>
</tr>
<tr>
<td><samp>/user/jrandom/</samp></td>
<td><samp>/pt/user/jrandom/</samp></td>
</tr>
<tr>
<td><samp>/settings/</samp></td>
<td><samp>/ru/settings/</samp></td>
</tr>
</table>
<div class="slide">
<p>
Django makes it easy to treat translation as a
user preference using the
<a href="https://docs.djangoproject.com/en/dev/topics/i18n/translation/#the-set-language-redirect-view">set_language() view</a>
and as of 1.4
<a href="https://docs.djangoproject.com/en/dev/topics/i18n/translation/#django.conf.urls.i18n.i18n_patterns">i18n_patterns()</a>
makes it easy to treat the first path component as
the language - which avoids the need for cookies
and works quite well with CDNs, spiders, etc. -
and to translate URL components as well (e.g.
<samp>/en/news/…</samp>,
<samp>/es/noticias/…</samp>)
</p>
<aside>
If you're using Django 1.3 or earlier, Joost Cassee's
<a href="http://pypi.python.org/pypi/django-localeurl">django-localeurl</a>
offers the same locale URL prefixing
</aside>
</div>
</li>
</ul>
</section>
<section class="slide" id="authoring-policies">
<h2>Authoring Policies</h2>
<ul>
<li>Who's creating your content?</li>
<li>Does anyone else translate it into other languages?</li>
<li>Does anyone review it?
<blockquote class="slide long" cite="http://nakedsecurity.sophos.com/2011/01/30/facebook-hacked-in-france-to-insult-someones-little-brother/">
<b>Facebook hacked in France to insult someone's little brother</b>
<p>
When setting your language to French and choosing
the option <q lang="fr">Signaler/bloquer cette personne</q>
(<q>Report/Block this person</q> in English) you are
confronted by a rather strange option.
</p>
<p>
In English, you will see choices such as <q>Fake
profile</q>, <q>Inappropriate profile info</q> and
<q>Inappropriate wall post</q>. But on the French
site, the last mentioned option now says, in what
reads like schoolboy French of an English speaker:
<q lang="fr">En discution instantané, Le petit
frère de Dylan Zéroosiix m’a insulter</q>. (<q>In
instant messenger the little brother of Dylan
Zéroosiix insulted me</q>)
</p>
</blockquote>
</li>
</ul>
</section>
<section class="slide exit">
<nav>
<a href="index.html#agenda">Back to agenda</a>
</nav>
</section>
<a href="#" class="deck-prev-link" title="Previous">←</a>
<a href="#" class="deck-next-link" title="Next">→</a>
<!-- deck.status snippet -->
<p class="deck-status">
<span class="deck-status-current"></span>
/
<span class="deck-status-total"></span>
</p>
<!-- deck.goto snippet -->
<form action="." method="get" class="goto-form">
<label for="goto-slide">Go to slide:</label>
<input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
<datalist id="goto-datalist"></datalist>
<input type="submit" value="Go">
</form>
<!-- deck.hash snippet -->
<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
<script src="deck.js/jquery-1.7.2.min.js"></script>
<script src="deck.js/core/deck.core.js"></script>
<script src="deck.js/core/deck.core.js"></script>
<script src="deck.js/extensions/hash/deck.hash.js"></script>
<script src="deck.js/extensions/menu/deck.menu.js"></script>
<script src="deck.js/extensions/goto/deck.goto.js"></script>
<script src="deck.js/extensions/status/deck.status.js"></script>
<script src="deck.js/extensions/navigation/deck.navigation.js"></script>
<script>
$(function() {
$.deck('.slide');
});
</script>
</body>
</html>