Use an i18n tool

This commit is contained in:
Gregory Trolliet 2020-11-23 11:01:37 +01:00
parent e487438606
commit 16dec853f9
12 changed files with 662 additions and 97 deletions

View file

@ -0,0 +1,13 @@
<?php
class L {
const home = 'Accueil';
public static function __callStatic($string, $args) {
if (defined("self::" . $string)) {
return vsprintf(constant("self::" . $string), $args);
}
}
function L($string, $args=NULL) {
$return = constant("L::".$string);
return $args ? vsprintf($return,$args) : $return;
}
}