464 |
jpm |
1 |
<!DOCTYPE html>
|
|
|
2 |
<html>
|
|
|
3 |
<head>
|
|
|
4 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
5 |
<meta name="generator" content="ApiGen 2.8.0">
|
|
|
6 |
|
465 |
jpm |
7 |
<title>Class I18n</title>
|
464 |
jpm |
8 |
|
|
|
9 |
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
|
465 |
jpm |
10 |
<script type="text/javascript" src="elementlist.js?4111837732"></script>
|
464 |
jpm |
11 |
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
|
|
|
12 |
|
|
|
13 |
</head>
|
|
|
14 |
|
|
|
15 |
<body>
|
|
|
16 |
<div id="left">
|
|
|
17 |
<div id="menu">
|
|
|
18 |
<a href="index.html" title="Overview"><span>Overview</span></a>
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
<div id="groups">
|
|
|
22 |
<h3>Packages</h3>
|
|
|
23 |
<ul>
|
|
|
24 |
<li class="active"><a href="package-Framework.html">Framework</a>
|
|
|
25 |
</li>
|
|
|
26 |
<li><a href="package-None.html">None</a>
|
|
|
27 |
</li>
|
|
|
28 |
<li><a href="package-PHP.html">PHP</a>
|
|
|
29 |
</li>
|
|
|
30 |
<li><a href="package-Utilitaire.html">Utilitaire</a>
|
|
|
31 |
</li>
|
|
|
32 |
</ul>
|
|
|
33 |
</div>
|
|
|
34 |
|
|
|
35 |
<hr>
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
<div id="elements">
|
|
|
39 |
<h3>Classes</h3>
|
|
|
40 |
<ul>
|
|
|
41 |
<li><a href="class-Bdd.html">Bdd</a></li>
|
|
|
42 |
<li><a href="class-Cache.html">Cache</a></li>
|
|
|
43 |
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
|
|
|
44 |
<li><a href="class-Chronometre.html">Chronometre</a></li>
|
|
|
45 |
<li><a href="class-Cli.html">Cli</a></li>
|
|
|
46 |
<li><a href="class-Config.html">Config</a></li>
|
|
|
47 |
<li><a href="class-Controleur.html">Controleur</a></li>
|
|
|
48 |
<li><a href="class-Debug.html">Debug</a></li>
|
|
|
49 |
<li><a href="class-Framework.html">Framework</a></li>
|
|
|
50 |
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
|
|
|
51 |
<li class="active"><a href="class-I18n.html">I18n</a></li>
|
|
|
52 |
<li><a href="class-Log.html">Log</a></li>
|
|
|
53 |
<li><a href="class-Registre.html">Registre</a></li>
|
|
|
54 |
<li><a href="class-RestClient.html">RestClient</a></li>
|
|
|
55 |
<li><a href="class-RestServeur.html">RestServeur</a></li>
|
|
|
56 |
<li><a href="class-RestService.html">RestService</a></li>
|
|
|
57 |
<li><a href="class-Script.html">Script</a></li>
|
|
|
58 |
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
|
|
|
59 |
<li><a href="class-Url.html">Url</a></li>
|
|
|
60 |
</ul>
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
</div>
|
|
|
67 |
</div>
|
|
|
68 |
</div>
|
|
|
69 |
|
|
|
70 |
<div id="splitter"></div>
|
|
|
71 |
|
|
|
72 |
<div id="right">
|
|
|
73 |
<div id="rightInner">
|
|
|
74 |
<form id="search">
|
|
|
75 |
<input type="hidden" name="cx" value="">
|
|
|
76 |
<input type="hidden" name="ie" value="UTF-8">
|
|
|
77 |
<input type="text" name="q" class="text">
|
|
|
78 |
<input type="submit" value="Search">
|
|
|
79 |
</form>
|
|
|
80 |
|
|
|
81 |
<div id="navigation">
|
|
|
82 |
<ul>
|
|
|
83 |
<li>
|
|
|
84 |
<a href="index.html" title="Overview"><span>Overview</span></a>
|
|
|
85 |
</li>
|
|
|
86 |
<li>
|
|
|
87 |
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
|
|
|
88 |
</li>
|
|
|
89 |
<li class="active">
|
|
|
90 |
<span>Class</span> </li>
|
|
|
91 |
</ul>
|
|
|
92 |
<ul>
|
|
|
93 |
<li>
|
|
|
94 |
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
|
|
|
95 |
</li>
|
|
|
96 |
<li>
|
|
|
97 |
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
|
|
|
98 |
</li>
|
|
|
99 |
<li>
|
|
|
100 |
<a href="todo.html" title="Todo list"><span>Todo</span></a>
|
|
|
101 |
</li>
|
|
|
102 |
</ul>
|
|
|
103 |
<ul>
|
|
|
104 |
</ul>
|
|
|
105 |
</div>
|
|
|
106 |
|
|
|
107 |
<div id="content" class="class">
|
|
|
108 |
<h1>Class I18n</h1>
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
<div class="description">
|
|
|
112 |
|
|
|
113 |
<p>I18n permet de traduire une application à partir de données stockées dans
|
|
|
114 |
des fichiers ini. Si vous souhaitez utiliser le fonctionnement par défaut vous
|
|
|
115 |
devrez :</p>
|
|
|
116 |
|
|
|
117 |
<ul>
|
|
|
118 |
<li>déposer les fichiers ini dans le dossier définit par la variable de config
|
|
|
119 |
"chemin_i18n".</li>
|
|
|
120 |
|
|
|
121 |
<li>nommer les fichiers selon la forme "locale.ini" (Ex.: fr.ini ou fr_CH.ini
|
|
|
122 |
).</li>
|
|
|
123 |
</ul>
|
|
|
124 |
|
|
|
125 |
<p>Elle offre l'accès en lecture seule aux paramètres des fichiers ini. C'est
|
|
|
126 |
une Singleton. Une seule classe de traduction peut être instanciée par
|
|
|
127 |
Application.</p>
|
|
|
128 |
|
|
|
129 |
</div>
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
|
|
|
135 |
|
|
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
|
139 |
<div class="info">
|
|
|
140 |
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
|
|
|
144 |
|
|
|
145 |
<b>Category:</b>
|
|
|
146 |
PHP 5.2<br>
|
|
|
147 |
<b>Copyright:</b>
|
|
|
148 |
Copyright (c) 2010, Tela Botanica (<a
|
|
|
149 |
href="mailto:accueil@tela-botanica.org">accueil@<!-- -->tela-botanica.org</a>)<br>
|
|
|
150 |
<b>License:</b>
|
|
|
151 |
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
|
|
|
152 |
<b>License:</b>
|
|
|
153 |
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
|
|
|
154 |
<b>Author:</b>
|
|
|
155 |
Jean-Pascal MILCENT <<a
|
|
|
156 |
href="mailto:jpm@tela-botanica.org">jpm@<!-- -->tela-botanica.org</a>><br>
|
|
|
157 |
<b>Version:</b>
|
|
|
158 |
$Id: I18n.php 331 2011-02-24 18:03:35Z jpm $<br>
|
|
|
159 |
<b>Since:</b>
|
|
|
160 |
0.3<br>
|
|
|
161 |
<b>Link:</b>
|
|
|
162 |
/doc/framework/<br>
|
465 |
jpm |
163 |
<b>Located at</b> <a href="source-class-I18n.html#3-234" title="Go to source code">I18n.php</a><br>
|
464 |
jpm |
164 |
</div>
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
<table class="summary" id="methods">
|
|
|
169 |
<caption>Methods summary</caption>
|
|
|
170 |
<tr data-order="get" id="_get">
|
|
|
171 |
|
|
|
172 |
<td class="attributes"><code>
|
|
|
173 |
public static
|
|
|
174 |
string
|
|
|
175 |
|
|
|
176 |
</code>
|
|
|
177 |
</td>
|
|
|
178 |
|
|
|
179 |
<td class="name"><div>
|
|
|
180 |
<a class="anchor" href="#_get">#</a>
|
|
|
181 |
<code><a href="source-class-I18n.html#43-80" title="Go to source code">get</a>( <span>string <var>$identifiant</var></span>, <span>mixed <var>$langue</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
182 |
|
|
|
183 |
<div class="description short">
|
|
|
184 |
|
|
|
185 |
<p>Accesseur pour la valeur d'une traduction</p>
|
|
|
186 |
|
|
|
187 |
</div>
|
|
|
188 |
|
|
|
189 |
<div class="description detailed hidden">
|
|
|
190 |
|
|
|
191 |
<p>Accesseur pour la valeur d'une traduction</p>
|
|
|
192 |
|
|
|
193 |
|
|
|
194 |
|
|
|
195 |
<h4>Parameters</h4>
|
|
|
196 |
<div class="list"><dl>
|
|
|
197 |
<dt><var>$identifiant</var></dt>
|
|
|
198 |
<dd><code>string</code><br>$param le nom du paramètre</dd>
|
|
|
199 |
<dt><var>$langue</var></dt>
|
|
|
200 |
<dd></dd>
|
|
|
201 |
</dl></div>
|
|
|
202 |
|
|
|
203 |
<h4>Returns</h4>
|
|
|
204 |
<div class="list">
|
|
|
205 |
<code>string</code><br>la valeur du paramètre<br>
|
|
|
206 |
</div>
|
|
|
207 |
|
|
|
208 |
|
|
|
209 |
|
|
|
210 |
|
|
|
211 |
</div>
|
|
|
212 |
</div></td>
|
|
|
213 |
</tr>
|
|
|
214 |
<tr data-order="charger" id="_charger">
|
|
|
215 |
|
|
|
216 |
<td class="attributes"><code>
|
|
|
217 |
public static
|
|
|
218 |
boolean
|
|
|
219 |
|
|
|
220 |
</code>
|
|
|
221 |
</td>
|
|
|
222 |
|
|
|
223 |
<td class="name"><div>
|
|
|
224 |
<a class="anchor" href="#_charger">#</a>
|
|
|
225 |
<code><a href="source-class-I18n.html#82-105" title="Go to source code">charger</a>( <span>string <var>$langue</var></span>, <span>mixed <var>$fichier</var> = <span class="php-keyword1">null</span></span>, <span>mixed <var>$format</var> = <code><a href="class-I18n.html#FORMAT_INI">I18n::<b>FORMAT_INI</b></a></code></span> )</code>
|
|
|
226 |
|
|
|
227 |
<div class="description short">
|
|
|
228 |
|
|
|
229 |
<p>Charge un fichier ini dans le tableau des paramètres de l'appli</p>
|
|
|
230 |
|
|
|
231 |
</div>
|
|
|
232 |
|
|
|
233 |
<div class="description detailed hidden">
|
|
|
234 |
|
|
|
235 |
<p>Charge un fichier ini dans le tableau des paramètres de l'appli</p>
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
|
|
|
239 |
<h4>Parameters</h4>
|
|
|
240 |
<div class="list"><dl>
|
|
|
241 |
<dt><var>$langue</var></dt>
|
|
|
242 |
<dd><code>string</code><br>$fichier_ini le nom du fichier à charger</dd>
|
|
|
243 |
<dt><var>$fichier</var></dt>
|
|
|
244 |
<dd></dd>
|
|
|
245 |
<dt><var>$format</var></dt>
|
|
|
246 |
<dd></dd>
|
|
|
247 |
</dl></div>
|
|
|
248 |
|
|
|
249 |
<h4>Returns</h4>
|
|
|
250 |
<div class="list">
|
|
|
251 |
<code>boolean</code><br>true, si le fichier a été trouvé et correctement chargé, sinon false.<br>
|
|
|
252 |
</div>
|
|
|
253 |
|
|
|
254 |
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
</div>
|
|
|
258 |
</div></td>
|
|
|
259 |
</tr>
|
|
|
260 |
<tr data-order="setLangue" id="_setLangue">
|
|
|
261 |
|
|
|
262 |
<td class="attributes"><code>
|
|
|
263 |
public static
|
|
|
264 |
array
|
|
|
265 |
|
|
|
266 |
</code>
|
|
|
267 |
</td>
|
|
|
268 |
|
|
|
269 |
<td class="name"><div>
|
|
|
270 |
<a class="anchor" href="#_setLangue">#</a>
|
|
|
271 |
<code><a href="source-class-I18n.html#107-115" title="Go to source code">setLangue</a>( <span>string <var>$langue</var></span> )</code>
|
|
|
272 |
|
|
|
273 |
<div class="description short">
|
|
|
274 |
|
|
|
275 |
<p>Définit la langue utiliser pour rechercher une traduction.</p>
|
|
|
276 |
|
|
|
277 |
</div>
|
|
|
278 |
|
|
|
279 |
<div class="description detailed hidden">
|
|
|
280 |
|
|
|
281 |
<p>Définit la langue utiliser pour rechercher une traduction.</p>
|
|
|
282 |
|
|
|
283 |
|
|
|
284 |
|
|
|
285 |
<h4>Parameters</h4>
|
|
|
286 |
<div class="list"><dl>
|
|
|
287 |
<dt><var>$langue</var></dt>
|
|
|
288 |
<dd><code>string</code><br>$fichier_ini le nom du fichier à charger</dd>
|
|
|
289 |
</dl></div>
|
|
|
290 |
|
|
|
291 |
<h4>Returns</h4>
|
|
|
292 |
<div class="list">
|
|
|
293 |
<code>array</code><br>le fichier ini parsé<br>
|
|
|
294 |
</div>
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
</div>
|
|
|
300 |
</div></td>
|
|
|
301 |
</tr>
|
|
|
302 |
</table>
|
|
|
303 |
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
|
310 |
|
|
|
311 |
<table class="summary" id="constants">
|
|
|
312 |
<caption>Constants summary</caption>
|
|
|
313 |
<tr data-order="FORMAT_INI" id="FORMAT_INI">
|
|
|
314 |
|
|
|
315 |
<td class="attributes"><code>string</code></td>
|
|
|
316 |
<td class="name"><code>
|
|
|
317 |
<a href="source-class-I18n.html#23-24" title="Go to source code"><b>FORMAT_INI</b></a>
|
|
|
318 |
</code></td>
|
|
|
319 |
<td class="value"><code><span class="php-quote">'.ini'</span></code></td>
|
|
|
320 |
<td class="description"><div>
|
|
|
321 |
<a href="#FORMAT_INI" class="anchor">#</a>
|
|
|
322 |
|
|
|
323 |
<div class="description short">
|
|
|
324 |
|
|
|
325 |
<p>Format de traduction utilisant les fichier .ini</p>
|
|
|
326 |
|
|
|
327 |
</div>
|
|
|
328 |
|
|
|
329 |
<div class="description detailed hidden">
|
|
|
330 |
|
|
|
331 |
<p>Format de traduction utilisant les fichier .ini</p>
|
|
|
332 |
|
|
|
333 |
|
|
|
334 |
</div>
|
|
|
335 |
</div></td>
|
|
|
336 |
</tr>
|
|
|
337 |
</table>
|
|
|
338 |
|
|
|
339 |
|
|
|
340 |
|
|
|
341 |
|
|
|
342 |
|
|
|
343 |
|
|
|
344 |
|
|
|
345 |
|
|
|
346 |
|
|
|
347 |
|
|
|
348 |
</div>
|
|
|
349 |
|
|
|
350 |
<div id="footer">
|
465 |
jpm |
351 |
API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
|
464 |
jpm |
352 |
</div>
|
|
|
353 |
</div>
|
|
|
354 |
</div>
|
|
|
355 |
</body>
|
|
|
356 |
</html>
|