Use an i18n tool
This commit is contained in:
parent
e487438606
commit
16dec853f9
12 changed files with 662 additions and 97 deletions
21
index.php
21
index.php
|
@ -1,18 +1,12 @@
|
|||
<?php
|
||||
|
||||
include('init.php');
|
||||
include('templates/header.php');
|
||||
include('db.php');
|
||||
|
||||
$db = new DataBase();
|
||||
if (!$db->isInit()) {
|
||||
echo 'Error db init';
|
||||
return;
|
||||
}
|
||||
$db->buildTables();
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
if (!$db->isCloud($id)) {
|
||||
echo 'NO CLOUD';
|
||||
echo L::cloud_noId;
|
||||
return;
|
||||
}
|
||||
$nbWords = $db->getCloudSize($id);
|
||||
|
@ -23,17 +17,20 @@ if (isset($_GET['id'])) {
|
|||
<?php
|
||||
for ($i=0;$i<$nbWords;$i++) {
|
||||
$name = 'fword' . $i;
|
||||
echo sprintf('<input class="cloud_words_input" type="text" id="%s" name="%s" placeholder="Mot %d">', $name, $name, $i+1);
|
||||
echo sprintf('<input class="cloud_words_input" type="text" id="%s" name="%s" placeholder="%s">',
|
||||
$name, $name, L::save_word($i + 1)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<input id="cloud_words_submit" type="submit" value="Enregistrer">
|
||||
<input id="cloud_words_submit" type="submit" value="<?php echo L::save_submit ?>">
|
||||
</form>
|
||||
<p><?php echo L::save_message ?></p>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<p>Voulez-vous créer un nouveau nuage de mots?</p>
|
||||
<p><?php echo L::cloud_create_message ?></p>
|
||||
<form method="post" action="create.php">
|
||||
<input type="submit" value="Créer">
|
||||
<input type="submit" value="<?php echo L::create ?>">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue